Refactored and delved into work on authentication/authorization. Still needs lots of work and testing. In particular, into how well the PermissionsMixin methods work, how to best cache permissions queries, and automatic authorization stuff in resources.