IE support

Fix all of the AJAX and event code to work in IE. Split out the Javascript
used by the plug-in into assets/auth_check.js.