diff --git a/apps/testing/appinfo/info.xml b/apps/testing/appinfo/info.xml
index bd64fca212180276d8b19d82af3116e4fe0f78c6..caefd1709c5450df7f63fe901141f79e4ed403a7 100644
--- a/apps/testing/appinfo/info.xml
+++ b/apps/testing/appinfo/info.xml
@@ -10,6 +10,6 @@
 		<nextcloud min-version="12" max-version="12" />
 	</dependencies>
 	<types>
-		<type>prelogin</type>
+		<authentication/>
 	</types>
 </info>
diff --git a/apps/testing/lib/Application.php b/apps/testing/lib/Application.php
index 19eda60acbd9ca74e1757a2f5da9384ae8200e38..8f42d0442dde3d2e9a44994a933566e7742a4df9 100644
--- a/apps/testing/lib/Application.php
+++ b/apps/testing/lib/Application.php
@@ -22,9 +22,21 @@
 namespace OCA\Testing;
 
 use OCP\AppFramework\App;
+use OCA\Testing\AlternativeHomeUserBackend;
 
 class Application extends App {
 	public function __construct (array $urlParams = array()) {
-		parent::__construct('testing', $urlParams);
+		$appName = 'testing';
+		parent::__construct($appName, $urlParams);
+
+		$c = $this->getContainer();
+		$config = $c->getServer()->getConfig();
+		if ($config->getAppValue($appName, 'enable_alt_user_backend', 'no') === 'yes') {
+			$userManager = $c->getServer()->getUserManager();
+
+			// replace all user backends with this one
+			$userManager->clearBackends();
+			$userManager->registerBackend($c->query(AlternativeHomeUserBackend::class));
+		}
 	}
 }