Hey there @jack6!
This is expected behavior - The front end uses /api/auth/me
endpoint to check if the user is authenticated or not (401 = logged out, 200 = logged in). You could technically adjust the profile handler to not return 401, but this would also require you to write your own front end code to get the user sessions since the useUser
hook expects that API to respond with a 401 if the user is unauthenticated.
Given this has surfaced multiple times already, I definitely recommend creating a feedback request as our product team monitors these for community engagement.