Fixed issues with logging in