Connection with server, and login session manage