+1 to what @Bainternet said.
The only way I can imagine is if you used some ajax on the username field, so that when a username was entered (on blur
maybe), a request would be sent to get that user’s groups. I would never do this, however, as it would allow anyone to look at a list of a user’s groups merely by typing their name into the login field, which seems to me a pretty serious privacy concern.
You could, without too much trouble, have a user setting that would allow a user to specify the group that he/she would like to be redirected to upon every login. You’d use the login_redirect
filter hook to do the magic.