fix the login code