@Override
    public void actionPerformed(ActionEvent e) {
      String username = loginPanel.getUsername();
      char[] password = loginPanel.getPassword();
      if (username.trim().isEmpty() || password.length == 0) {
        showErrorMessage(FIELDS_EMPTY);
        return;
      }
      client.login(username, password);
    }