public boolean serveRequest(ServerMessage message, Connection userConnection) {
    if (message.getMessageType() != ServerMessageType.REGISTER) {
      return false;
    }
    RegisterResponseMessage responseMessage;
    RegisterMessage registerMessage = (RegisterMessage) message;
    try {
      databaseOperations.addNewUser(registerMessage.getUsername(), registerMessage.getPassword(),
          registerMessage.getName());
      responseMessage = new RegisterResponseMessage(true, REGISTER_SUCCESSFUL);
    }
    catch (SQLException e) {
      responseMessage = new RegisterResponseMessage(false, USERNAME_ALREADY_EXISTS);
    }
    writeResponse(responseMessage, userConnection);
    return true;
  }