+my %cookies = CGI::Cookie->fetch();
+my $authenticated = 0;
+my ($auth_status, $sessionID);
+if (exists $cookies{'CGISESSID'}) {
+ ($auth_status, $sessionID) = check_cookie_auth(
+ $cookies{'CGISESSID'}->value,
+ { parameters => 'parameters_remaining_permissions' },
+ );
+}
+if ($auth_status eq 'ok') {
+ $authenticated = 1;
+}
+