The simplest way is to handle the Form.Load event of your main form.
Add:
formLogin fl = new FormLogin();
do
{
if (fl.ShowDialog() == DialogResult.Cancel)
{
Close();
return;
}
} while (!LoginOK(fl.Username, fl.Password));
That will suspend loading the main form while the user logs in, and close the form if they cancel it.
It assumes your login form has appropriate properties, and you write a LoginOK methods to check the user details.