title: Laravel can't see if a user is logged in on 404 error page
body: <p>I have created a custom 404 error page and I am using my app.layout to wrap it.</p>
  <p>But it's strange because when i get 404 error page even though I'm logged in the Login and Register links are seen. Why is that?</p>
  <p><a href="https://i.stack.imgur.com/Eqn5h.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Eqn5h.png" alt="enter image description here" /></a></p>
  <h3>update</h3>
  <p>when i log in on my page and write non existing route i get my 404 page with extended layout but it seems like Laravel doesn't have access to Auth::class and it doesn't see if a user is logged in or not.</p>
  <p>So instead of seeing Logout link i see &quot;Login&quot; and &quot;Register&quot; links</p>