worked out a little bug with login