Added a groups and permissions system stored as JSON.