Websocket tweaks

Quick fixes/improvements to our websocket handling.