Integrate authorization with POST /maintainer
Fixes some issues found along the way. Adds common test functionality to test/test.go which might be needed for our future tests. Depends on !13 (merged), that should be merged first (it changes some of that though).