firing websocket listen event on first page load