diff --git a/www/_include.php b/www/_include.php
index 270120301d41032cad37347cf904249e40af3add..fe7f58f12d6f0e092a050c2b37e298661eca6eb6 100644
--- a/www/_include.php
+++ b/www/_include.php
@@ -95,6 +95,7 @@ if (!file_exists($configdir . '/config.php')) {
 
 SimpleSAML_Configuration::setConfigDir($configdir);
 
-
+/* Make sure that the session is initialized before any output. */
+SimpleSAML_Session::getInstance();
 
 ?>
\ No newline at end of file