attempt to connect to server