Fixed invalid login check for unloggedin users.