There is a security option in Mac OS X to require you to enter your password when waking from sleep. I have this enabled. This option, unfortunately, has some rather annoying side effects.
A number of apps that use the system keychain (Adium, Shrook, Chicken of the VNC) all require you to re-authenticate as they wake up and attempt to re-connect to various services. When these apps need authentication, they pop up a password dialog.
So when the machine wakes from sleep, you first get a system username/password dialog. As you’re typing into that dialog, the application keychain access dialogs start popping-up in the background and I’m guessing that these steal the focus from the dialog you’re typing in.
This means you almost always have to re-focus into the login dialog to complete the login, or try again after the focus jumping around has causes the login to fail.
I’ve heard a lot of new Mac users complain about this, and I don’t blame them. I really can’t think of a good reason why this couldn’t be fixed. Or maybe there is a fix and I just don’t know about it?