public boolean login(String username, char[] password) {
    if (!isAuthorized) {
      LoginMessage loginMessage = new LoginMessage(username, password);
      sendMessageToServer(loginMessage);
      return true;
    }
    return false;
  }