Solving the login problem