Where correct $USER and $PASSWD are entered in the X login window as you have assuredly stated above, the problem is sometimes owed to the resource sockets permission. There are two (2) simple practical ways to solve this:
1 - Simply keep on repeating the login $USERNAME and $PASSWD. To my experience when repeating reaches the 4th or 5th time the socket gives up taking the user and passwd at its face value, and let's you in, ignoring other issues. or,
2 - Ctl+Alt+F3, login at the shell then remove the ailing sockets
rm -f .ICEauthority && rm -f .Xauthority
then return to the X login window Ctl-Alt+F7(or F8) there login as normally. You should be allowed this time.
Don't worry about sockets removed, X creates them voluntarily at run time when there is none that exist.
Hope that helps. Good luck.