diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
index 39c7f83a3c..608ce03186 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -1,6 +1,10 @@
-
+
+ data-user="" data-user-displayname=""
+
+ data-requesttoken="">
getTitle()); ?>
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php
index e4a2724de6..74578afe86 100644
--- a/lib/private/TemplateLayout.php
+++ b/lib/private/TemplateLayout.php
@@ -122,6 +122,10 @@ class TemplateLayout extends \OC_Template {
parent::__construct('core', 'layout.guest');
\OC_Util::addStyle('guest');
$this->assign('bodyid', 'body-login');
+
+ $userDisplayName = \OC_User::getDisplayName();
+ $this->assign('user_displayname', $userDisplayName);
+ $this->assign('user_uid', \OC_User::getUser());
} else if ($renderAs == 'public') {
parent::__construct('core', 'layout.public');
$this->assign( 'appid', $appId );