fixed hashing functionality in the login function

Now users can login