Fixes #3753: Adds a check to see if the incoming controller is from an

isolated namespace plugin controller to determine the login_users_path.

When a plugin is defined using isolate_namespace, the parent routes
are not available when in the context of an entity from the plugin. The routes
of the parent application must instead be accessed through the 'main_app'
entity made available to the plugin. This adds a check to see if the
main_app object is available as an indicator that an isolate_namespace
plugin is making the request to check authentication and be redirected
to the login page.