make the login action work correctly