public function getLoggedInAdministrator(): Administrator 
    {
        if (!isset($_SESSION[SlimPostgres::SESSION_KEY_ADMINISTRATOR_ID])) {
            throw new \Exception("No one is logged in");
        }

        if (null === $administrator = (AdministratorsEntityMapper::getInstance())->getObjectById($_SESSION[SlimPostgres::SESSION_KEY_ADMINISTRATOR_ID])) {
            unset($_SESSION[SlimPostgres::SESSION_KEY_ADMINISTRATOR_ID]); /** remove for security */
            throw new \Exception("Invalid administrator id ".$_SESSION[SlimPostgres::SESSION_KEY_ADMINISTRATOR_ID]." in session");
        }

        return $administrator;
    }