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