ws: better handshake