public void handleLogin(){
		User u = loginView.getModel();
		// Check if username is empty, if so then show a message.
		if (u.getUsername().isEmpty()) {
			JOptionPane
					.showMessageDialog(
							null,
							"U moet een gebruikersnaam invoeren om in te kunnen loggen.",
							"Fout!", JOptionPane.ERROR_MESSAGE);
		}

		// Check if password is empty, if so then show a message.
		else if (u.getPassword().length == 0) {
			JOptionPane
					.showMessageDialog(
							null,
							"U moet een wachtwoord invoeren om in te kunnen loggen.",
							"Fout!", JOptionPane.ERROR_MESSAGE);
		}

		// If the user has filled in a username and a password, then
		// check if the username and password are valid.
		else {
			try {
				// Create a new user controller.
				User user = new User();

				// Check if user is legit.
				boolean autheticated = user.login(
						u.getUsername(),
						u.getPassword());

				// If user is legit.
				if (autheticated) {
					UserRole role = user.role(u.getUsername());

					// Store user information in user object to pass
					// through.
					user.setUsername(u.getUsername());
					user.setRole(role.toString());

						CustomerController customerController = new CustomerController();
						RentalController rentalController = new RentalController();
						
						if (role == UserRole.BALIE) {
							rentalController.showRentalView();
						} else if (role == UserRole.ADMIN) {
							AdminController adminController = new AdminController();
							adminController.showAdminView();
							loginView.setVisible(false);
						} else if (role == UserRole.GARAGE) {
							DamageController damageController = new DamageController();
							damageController.showGarageView();
						} else if (role == UserRole.KLANT) {
							customerController.showCustomerView();
						} else if (role == UserRole.NONE) {
							JOptionPane
									.showMessageDialog(
											null,
											"U inloggegevens kloppen wel, maar u heeft nog geen rol toegewezen gekregen. Neem contact op met uw systeembeheerder.",
											"Fout!", JOptionPane.ERROR_MESSAGE);
						}
					}

				// If user is not legit.
				else {
					JOptionPane
							.showMessageDialog(
									null,
									"Uw inloggegevens kloppen niet, probeer het later opnieuw.",
									"Fout!", JOptionPane.ERROR_MESSAGE);
				}

			} catch (Exception e1) {
				e1.printStackTrace();
			}
		}
	}