Fixed to check for login credentials.