Modify source code to add id and key checking during WebSocket negotiation.