Improvements to login process