More API error messages + Prepping API usage

* A few more error messages for API failures including one that notifies the user about needing to log in.
* I've moved the test for whether the API is needed on the comments page into the searchJson function. My next plan is to add conditions for eliminating unnecessary API calls on the other pages in the same way. For the actual image pages, I'm thinking I'll create an "alternate" fetchJson function that will return a substitute object with the necessary information directly retrieved from the page. I'll start this in a separate branch like I did for the comments upgrade.