Preroute - Framework 7

Hi, I tried the best I could but it did not succeed to make the Pretoute functionality of Framework7 to work.
I’m using V1.
This is the piece of code I use :
var myApp = new Framework7({
preroute: function (view, options) {
if (!userLoggedIn) {
view.router.loadPage(‘auth.html’); //load another page with auth form
return false; //required to prevent default router action
From what I understand, whenever the framework7 router is triggered, it checks a variable (userLoggedIn here) and then launch a default page, which can be a login or auth page.
Actually I tried and I have this error : “Maximum call stack size exceeded”

Here are the examples :

Simple example without preroute

Same with preroute which triggers "Maximum call stack size exceeded"