added websocket upgrade mechanism to client and server (untested)