private void SetRootPage()
        {
            if (RootPage is Views.Login page && page.BindingContext is ViewModels.Login vm)
            {
                vm.SetRootPage = null;
            }

            if (!Csla.ApplicationContext.User.Identity.IsAuthenticated)
            {
                ViewModels.Login loginViewModel = new ViewModels.Login
                {
                    SetRootPage = () => SetRootPage()
                };
                RootPage = new Views.Login {
                    BindingContext = loginViewModel
                };
            }
            else
            {
                RootPage = new AppShell {
                    BindingContext = new ViewModels.Landing()
                };
            }

            MainPage = RootPage;
        }
 public void Logout()
 {
     ViewModels.Login loginViewModel = new ViewModels.Login
     {
         SetRootPage = () => SetRootPage()
     };
     MainPage = RootPage = new Views.Login {
         BindingContext = loginViewModel
     };
 }