Fixed issues with login