The simplest way to do this is to have the login form as the initial form, and when the login is correct, it then creates an instance of the new form and hides itself:
frmMain fm = new FormMain(string userName);
Hide();
fm.ShowDialog();
Close();
The close at the end exits the application when the user closes the main form.