Login with hashed password and some improvements