I'm writing my first "real" MVVM application, and the first step the user will need to take is to provide login credentials. In the past, I would have shown the login dialog after the main window has been laid out and made visible for the first time.
What is the preferred way of doing this in the MVVM world, and why?
I see many options, one of which is to continue doing it the way I've done it before, as it's a one-time step and won't interfere with the rest of the "MVVM-ness" of the application. Once the user has logged in, I could initialize the MainWindow's ModelView with their credentials and then continue on my way. Another option is to let the ModelView cause the login dialog to be shown (somehow). Do MVVM gurus prefer either of these?
(There is one other option, which is showing the login dialog first, and then when it is dismissed, create the main window. This would technically solve my dilemma, but it wouldn't really educate me, nor do I like the aesthetics of having a "naked" login dialog.)