When rendering on the server the session is not eagerly loaded when the authenticated middleware runs, causing it to think the user is not logged in. Fix by awaiting the session composable.
Set up a dedicated Account Setttings page to hold account specific settings such as the push notifications.