connecting client to server