code: private void redirectToLoginPage(FacesContext context, UIViewRoot viewRoot) {
          Map<String, Object> sessionMap = context.getExternalContext().getSessionMap();
          preLoginEvent.fire(new PreLoginEvent(context, sessionMap));
          LoginView loginView = viewConfigStore.getAnnotationData(viewRoot.getViewId(), LoginView.class);
          if (loginView == null || loginView.value() == null || loginView.value().isEmpty()) {
              log.debug("Returning 401 response (login required)");
              context.getExternalContext().setResponseStatus(401);
              context.responseComplete();
              return;
          }
          String loginViewId = loginView.value();
          log.debugf("Redirecting to configured LoginView %s", loginViewId);
          NavigationHandler navHandler = context.getApplication().getNavigationHandler();
          navHandler.handleNavigation(context, "", loginViewId);
          context.renderResponse();
      }
docs: Perform the navigation to the @LoginView.  If not @LoginView is defined, return a 401 response.
  The original view id requested by the user is stored in the session map, for use after a successful login.
  
  @param context
  @param viewRoot