Replacing optJSONObject with optString

Replacing optJSONObject usage in "register" action with optString usage, as per the "list" action