Further fixes for login