refactored code: Sock.js & wsd.js
WebSocket: Register, Greet, Ping