Auth and ACL fixes

Also some helper fixes