Find out if a user is logged into a web app from the root website

I have an anm application that manages the user reserved area for a website.
In IIS I configured the website www.demo.com (asp.net web pages) and then added the anm webapp to it (www.demo.com/anmwebapp), so they are two different technoologies solutions.
Now I would like to know from the root website whether a user is logged in to the anm webapp or not (and know the username). What are the best ways?

  1. COOKIES ACCESS SOLUTION: The authentication cookies generated by anm have the path /anmwebapp and not the root path / , and therefore they are not visible from the site. Even if I generated them with the root path / , how could I read them to find out if a user is logged in and their username?
  2. WEBAPI SOLUTION: I could create a webapi to return the IsLoggedIn status with the CurrentUserName, but I have to call it with every page load and I don’t want to unnecessarily burden the server.
  3. Any other ideas?

You can enable the User Table List Page Options → Logout user option, then login as the hard-code admin and go to the list page to see the number of active login users.

To check from your root application, look at the activeUserFilter function in the list page to see how it is implemented.