@Override
		public void actionPerformed(ActionEvent e) {
			String username = txfUser.getText().trim(), password = new String(
					pwfPassword.getPassword()).trim();
			if (username.length() < 1) {
				JOptionPane.showMessageDialog(LoginFrame.this,
						"The user field must not be empty. ", "Input error",
						JOptionPane.ERROR_MESSAGE);
				return;
			}
			else if (password.length() < 1) {
				JOptionPane.showMessageDialog(LoginFrame.this,
						"The password field must not be empty. ",
						"Input error", JOptionPane.ERROR_MESSAGE);
				return;
			}
			try {
				Service.login(username, password);
				LoginFrame.this
						.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
				MainFrame frame = new MainFrame();
				frame.setVisible(true);
				LoginFrame.this.setVisible(false);
			}
			catch (LoginException ex) {
				JOptionPane.showMessageDialog(LoginFrame.this, ex.getMessage(),
						"Login error", JOptionPane.ERROR_MESSAGE);
			}
		}