Cleaned up the login process