Fixed problems with logging in