Fixed bug with logging in