For example, If a nobody is logged in, I want to show them links to where they can sign up or log back in, but if a user is logged in, I want a way to let them access their profile and other information.
You need to use maybeAuth
from the Haskell code to get the auth information, then $maybe
inside Hamlet to change behavior based on that result. You can't do maybeAuth
from inside Hamlet, since Hamlet does not allow you to perform any actions (like database lookups).