fixes bug with login