Added js to handle not authorized condition
It's not the best because it uses AJAX,
so part of the page will load before the user receives
the 'not authorized' message, but it works.
They still can't edit it anyway
Fixed a few errors in the api and the js
*A little more consistency: some post functions now
consistently use success and the errors array (not all)
*In the js added more error handling for cases where the post
does not exist, or the user is not authorized, or any other gener
failure
PEP8 fix