More work on login for 5.3.0a

Gonna continue working on this tomorrow.