John,
Not knowing when you call the login from the main I can't say. I know that if you take the login out of the main fomr and call it from the startup program before you run the main form you will have less confusion. Let the startup program call the login form and if the login fails then don't run the main form or issue the read events at all, just kill the app from the startup program by quiting.