public static void login(LoginWindowInterface window) {
        Employee employee = null;
        String userID;
        int accessLevel;
        char[] password, password1 = null;
        userID = window.getUserTxtFld().getText();
        password = window.getPswrdField().getPassword();
        try {

            employee = new EmployeeDA().searchEmployeeByID(userID);
            password1 = employee.getPassword().toCharArray();
            accessLevel = employee.getAccessLevel();
            if (Arrays.equals(password, password1)) {

                window.setVisible(false);
                updateWorkingDetail(userID);
                MainGUI mainGUI = new MainGUI(userID,employee);
                mainGUI.setExtendedState(JFrame.MAXIMIZED_BOTH);
                

                AccessLevelManager alm = new AccessLevelManager(mainGUI);

                switch (accessLevel) {
                    case 2:
                        alm.cashierAccess();
                        break;

                    case 3:
                        alm.cardMarkerAccess();
                        break;

                    case 4:

                        alm.teamLeaderAccess();
                        break;
                }
                mainGUI.setVisible(true);
            } else {
                JOptionPane.showMessageDialog(window, "Access Denide");
            }
        } catch (ClassNotFoundException | SQLException ex) {
            System.out.println(ex.getMessage());
        } catch (NullPointerException ex) {
            JOptionPane.showMessageDialog(window, "User Does Not Exist");
        } catch (AddRecordException ex) {
            System.out.println(ex.getMessage());
        }
    }