manage creation and termination of websocket sessions