changes that allow turning WebSocket on and off