Establish connection to server