Fixed bug of login