Update javascript to be more modular.

The javascript needs to be primed not only for articles but for logins
and submissions as well.  This breaks the javascript up and makes this
easier while allowing each operation independently.
Add article submissions via the frontend.

Adds a javascript function to submit the article via the API as well as
update the API headers (``Access-Control-Allow-Origin``).

Also add a javascript function that hooks ``submitArticle`` to the
submission form.