Session middleware sets locals for principal and principalUser
Use principalUser and principal in web routes
Use principal and principalUser in templates
Set principal and principalUser for client-side rendering