Can't log in until after reboot

From your symptoms and the lack of any other any evidence within your log files, the origin of your problem is a keyboard mode switch. This keyboard mode switch will only make your password wrongly typed through the login window and not through an ssh access. This remapping of your keyboard might have been caused by command ⌘+space (select previous input source) or command ⌘+alt ⌥+space (select next input source). The 1st one of these 2 key combinations may be easily entered by typing the spacebar on one of its left or right borders, thus pressing the command ⌘ at the same time. This shortcut is defined in:

System Preferences > Language & Text > Input Sources

This keyboard remapping might also have been done by any other keyboard shortcut defined by Xcode or another application.

To avoid to be trapped by such an invisible keyboard remapping or misbehaviour, here are 2 personnal trick.

  1. Within System Preferences > Users & Groups > Login Options, for Display login windows as: select Name and password. Hence you will have a possibility to diagnose any wrong mapping or any other misbehaviour of your keyboard within the field Name:. You might try your password there and have a total feedback.

  2. Within System Preferences > Users & Groups > Login Options, activate the function Show Input menu in login window. This 2nd trick won't help you diagnose a dead key.