completes ws handshake