public function logout()
    {
        if (!$this->isActive()) {
            return false;
        }

        auth()->logout();

        // log back in as the original user
        $originalUserId = session()->get($this->originalUserKey);

        if ($originalUserId) {
            auth()->loginUsingId($originalUserId);
        }

        session()->forget($this->originalUserKey);
        session()->forget($this->isActiveKey);

        return true;
    }