fixed error while logging in