Create basic acl framework

Fixes #265
Lots of fixing the error messages here.

-503 is the standard error message for something like a database error, or so it seems
-412 is the error for bad parameters
-we should always return res...