[frontend] Rework websockets service.