Fixed bug in login