add json token management for /api/json