Fixed a connection bug in login.