Fix a bug of login tool.