I noticed that when I have a USB keyboard attached to my laptop, I can log in and out just fine. But when I undock my laptop, I would be unable to log back in. I found this to be due to a mismatch between the NumLock states on both keyboards. In other words, instead of typing letters, I would be typing numbers (on the right portion of the laptop keyboard), so my password didn't work.
Most password dialogs warn on CapsLock, but NumLock is potentially a bigger problem because there's often no LED indicator that it's enabled, and no one would reasonably expect different keyboards connected to the same machine to have different states of these keys.
One solution is to sync all keyboards. Another solution is to display icons warning when they are enabled. Or both. Or just have a checkbox for "show password".