order logic around saving a person

Changed logic around when saving a person so that the person is saved
prior to saving the persons groups, badges, and permissions.