fix a bug of login