t:#D73A49;--shiki-dark:#F97583;">end</span></span></code></pre></div><p>And that&#39;s it! The visitor should be redirected if they aren&#39;t logged in, but should be allowed to restricted pages like the dashboard page if they are.</p><h3 id="you-don-t-need-page-hooks-for-this" tabindex="-1">You Don&#39;t Need Page Hooks for This <a class="header-anchor" href="#you-don-t-need-page-hooks-for-this" aria-label="Permalink to &quot;You Don&#39;t Need Page Hooks for This&quot;">​</a></h3><p>Implementing someth