Add /api/exit endpoint