Several fixes to improve the initial login for a user