set up websockets communication