I have created a Plugin which enables securing pages with a password. The Plugin listens to GenericPageLoadedEvent and HttpCacheHitEvent and checks if a password for the accessed page has been set. If a password was set and the session wasn't logged into that page, the subscriber redirects the request to my login page.
Here is the problem: The login page is missing all the navigations. The common solution to combat this is to load a generic page. But that also triggers the events the plugin is already listening to and causes a loop.
Is there any way around this problem? Is it possible to only load the navigations?