fixed problem when user could not log in from login page when another user was logged in

this bug existed when you log in as "User1" (for example), but want to
access admin panel, you are not authorized to do that, and you get
redirected to login page, try to log in as "administrator" and you
would fail because password hashing function didnt work