Creating a login form that will then proceed to the main form if the credentials are correct. Here is the basic pseudocode:
ShowLoginForm() if (DialogResul
why not create main form and then show login modal dialog. Then you could check what to do.