add chat and websocket handler