Custom auth

Bunch of authorizations and permissions fixes, plus some view tweaks