Clean some messed code

-Add dlgLogin, frmMain
-Implement Singleton pattern