private void login() throws NoSuchAlgorithmException, IOException {

		if (login.cmbUserRole.getSelectedIndex() > 0) {
			if (validateUser()) {
				if (formMain == null) {
					EventController eventController = EventController
							.getInstance();
					FormMain mainForm;
					mainForm = new FormMain(eventController);
					eventController.setCurrentGuiInstance(mainForm);
					this.setFormMain(mainForm);
					mainForm.createAndShow();
				}
			} else {
				JOptionPane.showMessageDialog(login,
						"Password you entered is incorrect", "Access Dinied",
						JOptionPane.ERROR_MESSAGE);
			}
		} else {
			JOptionPane.showMessageDialog(login,
					"Please select a valid user type", "Access Dinied",
					JOptionPane.ERROR_MESSAGE);
		}
	}