Implemented setGroups and setPermissions on user to properly handle collections.