More work on login for 5.3.0a