Fixed app crashing on incorrect logins

The log was calling for the name of the retrieved user from the
database. Even in the case of the retrieved user's name being null the
case of an incorrect login being used) causing a null pointer exception.
Just moved the log into the if statement.