private void login() {
		
		String pin = new  String(txtEmployeePin.getPassword());
		//access DB and return the associated employee

		Employee loggedInEmployee;
		try {
			loggedInEmployee = Employee.getEmployeeByPIN(pin);
		} catch (Exception e) {
			JOptionPane.showMessageDialog(frame, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
			return;
		}
		//check employee type and open corresponding window
		if(loggedInEmployee.getEmployeePosition() == Employee.EmployeePosition.Staff){
			//open orders window
			System.out.println("Opening Orders Window!");
			OrdersView Orders = new OrdersView(loggedInEmployee);
			Orders.setVisible(true);
			Orders.setExtendedState(JFrame.MAXIMIZED_BOTH);
		}
		else if(loggedInEmployee.getEmployeePosition() == Employee.EmployeePosition.Kitchen){
			//open kitchen window
			System.out.println("Opening Kitchen Window!");
			KitchenView Kitchen = new KitchenView();
			Kitchen.setVisible(true);
			Kitchen.setExtendedState(JFrame.MAXIMIZED_BOTH);
		}
		else if(loggedInEmployee.getEmployeePosition() == Employee.EmployeePosition.Manager){
			//open manager window
			System.out.println("Opening Manager Window!");
			ManageView Manage = new ManageView(loggedInEmployee);
			Manage.setVisible(true);
			Manage.setExtendedState(JFrame.MAXIMIZED_BOTH);
		}
		else{
			//error, pin couldn't be matched
			JOptionPane.showMessageDialog(frame, "Employee Position could not be resolved", "Invalid Employee Position", JOptionPane.ERROR_MESSAGE);
			return;
		}
		frame.setVisible(false);
		dispose();
		
	}