<?php

return [
  'pattern' => '(:all)logout',
  'action'  => function () {
      $kirby = kirby();

      if ($user = $kirby->user()) {
          $user->logout();
          session_start();
      }

      go(site()->url() . '/login');
  },
];
