Websocket chat in erlang, ported from http://martinsikora.com/nodejs-and-websocket-simple-chat-tutorial