Return json from logout view, when appropriate.