code: public function onLogoutSuccess(Request $request): Response
      {
          if ($this->scopeMatcher->isBackendRequest($request)) {
              return $this->createRedirectResponse($request, 'contao_backend_login');
          }
  
          if ($targetUrl = $request->query->get('redirect')) {
              return $this->createRedirectResponse($request, $targetUrl);
          }
  
          if ($targetUrl = $request->headers->get('Referer')) {
              return $this->createRedirectResponse($request, $targetUrl);
          }
  
          return $this->clearJwtToken($request, parent::onLogoutSuccess($request));
      }
docs: {@inheritdoc}