if this is not written in if-loop, mainframe will be shown every time when the loginbutton pressed, even if theres no username and password is written.

                //*********meanwhile*********
                em.setLoggedinUser(user);
                new MainController(em);
                //**************************