Fix login bug.

Now returns error message when a wrong username is used.