diff --git a/modules/consentAdmin/www/consentAdmin.php b/modules/consentAdmin/www/consentAdmin.php
index e49729cb479da49371f24416ecb54fd19ecb24ec..00e96ae129bf4f9c23e509a9461af99cd56d3b62 100644
--- a/modules/consentAdmin/www/consentAdmin.php
+++ b/modules/consentAdmin/www/consentAdmin.php
@@ -60,18 +60,19 @@ function driveProcessingChain($idp_metadata, $source, $sp_metadata, $sp_entityid
 // Get config object
 $config = SimpleSAML_Configuration::getInstance();
 $cA_config = SimpleSAML_Configuration::getConfig('module_consentAdmin.php');
+$authority = $cA_config->getValue('authority');
+
+$as = new SimpleSAML_Auth_Simple($authority);
 
 // If request is a logout request
 if(array_key_exists('logout', $_REQUEST)) {
     $returnURL = $cA_config->getValue('returnURL');
-	SimpleSAML_Auth_Default::initLogout($returnURL);
+	$as->logout($returnURL);
 }
 
 $hashAttributes = $cA_config->getValue('attributes.hash');
-$authority = $cA_config->getValue('authority');
 
 /* Check if valid local session exists */
-$as = new SimpleSAML_Auth_Simple($authority);
 $as->requireAuth();
 
 // Get released attributes