public boolean register(String username, String password, String name) {
    if (!isAuthorized) {
      RegisterMessage registerMessage = new RegisterMessage(username, password, name);
      sendMessageToServer(registerMessage);
      return true;
    }
    return false;
  }