public static boolean isLoggedIn() {
        var subject = SecurityUtils.getSubject();
        return subject.isAuthenticated() || subject.isRemembered();
    }
makes sure that there is no double-logout

@param request
@param response
@param useFallback
@param fallbackPath
support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/Forms.java