Login functionality fixed.

Login functionality finally works to check if the user exists or
doesn't exist in the database. Doesn't rewrite over any data.