I think the solution to your problem is quite simple.
In a nutshell, you create one ViewModel as a shell that appears when you log in when the application starts. If the user logs in successfully, this window closes, and the same instance of viewModel is displayed in the content window. If the user logs out, the login window is displayed again.
First of all, create an IShell interface that provides two delegates LoginSuccessful and Logout
public interface IShell { Action LoginSuccessful { get; set; } Action Logout { get; set; } }
Then create a ShellViewModel class that implements IShell
public class ShellViewModel : Screen, IShell { public ShellViewModel() { LoginSuccessful = delegate { }; Logout = delegate { }; } public Action LoginSuccessful { get; set; } public Action Logout { get; set; } public void DoLogin() { LoginSuccessful(); } public void DoLogout() { Logout(); } }
The DoLogin and DoLogout methods are actions that can be bound to a Button or any other control suitable for you.
The next step is to override OnStartupMethod in your Bootstrapper. In this case, you have an instance of WindowManager and ShellViewModel exported by the IoC Framework of your choice.
protected override void OnStartup(object sender, StartupEventArgs e) { var windowManager = IoC.Get<IWindowManager>(); var viewModel = IoC.Get<IShell>(); viewModel.LoginSuccessful = () => GuardCloseAndReopen("Content"); viewModel.Logout = () => GuardCloseAndReopen("Login"); windowManager.ShowWindow(viewModel, "Login"); } private void GuardCloseAndReopen(string shellViewMode) { var windowManager = IoC.Get<IWindowManager>(); var shellScreen = IoC.Get<IShell>() as Screen; Application.ShutdownMode = ShutdownMode.OnExplicitShutdown; shellScreen.TryClose(); Application.ShutdownMode = ShutdownMode.OnLastWindowClose; windowManager.ShowWindow(shellScreen, shellViewMode); }
The trick for this: if the DoLogout method is DoLogout , the current window closes by calling TryClose on the ShellViewModel . At the same time, you cannot disable the application by setting Application.ShutdownMode to OnExplicitShutdown . Then, using windowmanager, you create another window in login mode, passing "Login" as the context information to windowManager. This is, in fact, the same ViewModel, but with a different visual representation.
For Logout you do the same only around.
To get this working using Caliburn conventions, you need a special project structure, as shown here (and explained there ): 
Now I urge you to take this code and create a small sample application. Create a Login View (which logs in with a button or something else) and create a Content View with a Logout button using the LoginSuccessful / Logout methods.
This will solve your problem with a minimum of code and classes. Hope this will be helpful for you.