Feature/permissions

Fixes #44 
Fixes #41 
Fixes #37 
Fixes #17