Connecting to the server.