sLoggedIn) m.route.set(&quot;/login&quot;)
            else return Home
        }
    },
    &quot;/login&quot;: Login
})</code></pre>
<p>When the application loads, <code>onmatch</code> is called and since <code>isLoggedIn</code> is false, the application redirects to <code>/login</code>. Once the user pressed the login button, <code>isLoggedIn</code> would be set to true, and the application would redirect to <code>/secret</code>. The <code>onmatch</code> hook would run once again, and since <code>isLogge