fixing some errors with login