Improvements to login sequence

Signed-off-by: Jack Huey kitskub@gmail.com