Check for required plugin in scripts

Adds a check for the Json API plugin to avoid breakage if it fails.
Also cancels load of angular if the plugin isn't active