I guess you have to build it yourself. I've done something like this for a websocket chat system, build on top of plain asynchttpserver. For http i basically created a (session) cookie in the browser and stored it in the servers datastore. i've done it a little different, since the websocket connection have to be authenticated, so i've done the auth with websocket and created a cookie with the javascript frontend.