Working websockets to browser and back