fix a bug in `login` command.