Instead of hiding the login form do something similar to what is illustrated in this tip/trick:
Multiple Subsequent Main Forms in C# Apps[
^]
The root problem, however, is that you may have left a thread running or some other thing is not being cleaned up when exiting the application. I would search out the real cause of the problem instead of trying band-aids and workarounds.
Your only friend in this is the debugger built in Visual Studio.