private void doLogin() {
        if (tfPassword != null && tfUser != null) {
            if (takeLogin()) {
                MainFrame frame = new MainFrame(userLoggedIn);
                PanelHelper.setMainFrame(frame); // set the currently active Mainframe
                frame.initMainFrame(); // init the mainframe with data
                this.setVisible(false);
                this.dispose();
                frame.setVisible(true);
                frame.setLocationRelativeTo(this);
            } else {
                JOptionPane.showMessageDialog(null, "Lösenord matchade inte eller användare fanns ej", "Login misslyckades", JOptionPane.WARNING_MESSAGE);
            }
        }
    }