refactored json unmarshal from middleware into each websockethandler so we can have different package structure for each route