Groups and permissions design

This is all the code that makes the groups and group page prettier as well as permissions for publications and annotations. Review appreciated.