Permissions UI

Among other things, fixes #482 and #450.
Could use jQuery UI tooltip API as mentioned elsewhere?