some refactoring, mostly allowing admins to delete users and change users permissions