Check setup status when making API responses

Closes #3303, Closes #3299
* Check whether or not setup has been completed when deciding
  how to respond to certain API requests.
* Add tests.