fixed a bug, so that login method would connect server again

Signed-off-by: scauwjh <scauwjh@gmail.com>