Return json for api errors

* Modify the API decorators so that they only return JSON for api methods
* Also includes a new 403 page