Updated websocket handling to support cowboy 0.8.6

Changes are based on the websocket example in cowboy

closes #5
Merge branch 'g5-Client_not_connecting'