Use JSON to send/receive group data.
Squashed commits from PR #4364 for master.

Conflicts:
	settings/js/users.js
Break long lines into smaller ones.
Merge pull request #4364 from ringmaster/fix_4351

Store and retrieve group data as JSON