Usergroup membership caching
Admin flag can be assigned to usergroup
Small refactorings