diff --git a/resources/static/dialog/start.js b/resources/static/dialog/start.js
index 77834cc71dc76d45883ba291c754c59d3e4e7d04..459cee2b0137f66674b70c1c00bb57b271ccb1c4 100644
--- a/resources/static/dialog/start.js
+++ b/resources/static/dialog/start.js
@@ -15,7 +15,7 @@
   moduleManager.register("code_check", modules.CodeCheck);
 
   moduleManager.start("code_check", {
-    environment: "__BROWSERID_ENVIRONMENT__",
+    file_name_prefix: "dialog",
     code_ver: "__BROWSERID_CODE_VERSION__",
     ready: function(status) {
       // if status is false, that means the javascript is out of date and we
diff --git a/resources/static/pages/start.js b/resources/static/pages/start.js
index d64a447b60a46c19eccacc0ee43ba8a4ba624369..d06630849a589bf9b38e19346b8ed39cb3e181b9 100644
--- a/resources/static/pages/start.js
+++ b/resources/static/pages/start.js
@@ -14,67 +14,84 @@ $(function() {
       pageHelpers = bid.PageHelpers,
       network = bid.Network,
       user = bid.User,
+      dom = bid.DOM,
       token = pageHelpers.getParameterByName("token"),
       path = document.location.pathname,
-      XHRDelay = bid.Modules.XHRDelay,
-      XHRDisableForm = bid.Modules.XHRDisableForm;
+      moduleManager = bid.module,
+      modules = bid.Modules,
+      CodeCheck = modules.CodeCheck,
+      XHRDelay = modules.XHRDelay,
+      XHRDisableForm = modules.XHRDisableForm;
 
   network.init({ time_until_delay: 10 * 1000 });
-  var xhrDelay = XHRDelay.create({});
-  xhrDelay.start();
-  var xhrDisableForm = XHRDisableForm.create({});
-  xhrDisableForm.start();
 
-  if (!path || path === "/") {
-    bid.index();
-  }
-  else if (path === "/signin") {
-    var module = bid.signIn.create();
-    module.start({});
-  }
-  else if (path === "/signup") {
-    bid.signUp();
-  }
-  else if (path === "/forgot") {
-    bid.forgot();
-  }
-  else if (path === "/add_email_address") {
-    var module = bid.addEmailAddress.create();
-    module.start({
-      token: token
-    });
-  }
-  else if(token && path === "/verify_email_address") {
-    bid.verifyEmailAddress(token);
-  }
+  moduleManager.register("code_check", CodeCheck);
 
+  $(".display_always,.display_auth,.display_nonauth").hide();
   if ($('#vAlign').length) {
     $(window).bind('resize', function() { $('#vAlign').css({'height' : $(window).height() }); }).trigger('resize');
   }
 
-  $("a.signOut").click(function(event) {
-    event.preventDefault();
-    event.stopPropagation();
 
-    user.logoutUser(function() {
-      document.location = "/";
-    }, pageHelpers.getFailure(bid.Errors.logout));
-  });
+  moduleManager.start("code_check", {
+    file_name_prefix: "browserid",
+    code_ver: "__BROWSERID_CODE_VERSION",
+    ready: function(status) {
+      if(!status) return;
 
-  $(".display_always,.display_auth,.display_nonauth").hide();
+      dom.addClass("body", "ready");
 
-  var ANIMATION_TIME = 500;
-  user.checkAuthentication(function(authenticated) {
-    $(".display_always").fadeIn(ANIMATION_TIME);
-
-    if (authenticated) {
-      $(".display_auth").fadeIn(ANIMATION_TIME);
-      if ($('#emailList').length) {
-        bid.manageAccount();
+      moduleManager.register("xhr_delay", XHRDelay);
+      moduleManager.register("xhr_disable_form", XHRDisableForm);
+      if (!path || path === "/") {
+        bid.index();
       }
-    }
-    else {
-      $(".display_nonauth").fadeIn(ANIMATION_TIME);
+      else if (path === "/signin") {
+        var module = bid.signIn.create();
+        module.start({});
+      }
+      else if (path === "/signup") {
+        bid.signUp();
+      }
+      else if (path === "/forgot") {
+        bid.forgot();
+      }
+      else if (path === "/add_email_address") {
+        var module = bid.addEmailAddress.create();
+        module.start({
+          token: token
+        });
+      }
+      else if(token && path === "/verify_email_address") {
+        bid.verifyEmailAddress(token);
+      }
+
+      $("a.signOut").click(function(event) {
+        event.preventDefault();
+        event.stopPropagation();
+
+        user.logoutUser(function() {
+          document.location = "/";
+        }, pageHelpers.getFailure(bid.Errors.logout));
+      });
+
+      var ANIMATION_TIME = 500;
+      user.checkAuthentication(function(authenticated) {
+        $(".display_always").fadeIn(ANIMATION_TIME);
+
+        dom.addClass("body", authenticated ? "authenticated" : "not_authenticated");
+        if (authenticated) {
+          $(".display_auth").fadeIn(ANIMATION_TIME);
+          if ($('#emailList').length) {
+            bid.manageAccount();
+          }
+        }
+        else {
+          $(".display_nonauth").fadeIn(ANIMATION_TIME);
+        }
+      });
+
+
     }
   });
 
diff --git a/resources/static/shared/modules/code_check.js b/resources/static/shared/modules/code_check.js
index 99798ba774f678310e1782e0aa6ff7ac5d824f8c..80856c524e9cec2f77bcdaac9b0f9b047c173b92 100644
--- a/resources/static/shared/modules/code_check.js
+++ b/resources/static/shared/modules/code_check.js
@@ -11,7 +11,8 @@ BrowserID.Modules.CodeCheck = (function() {
   var bid = BrowserID,
       dom = bid.DOM,
       sc,
-      expectedCodeVer;
+      expectedCodeVer,
+      fileNamePrefix;
 
   function getMostRecentCodeVersion(oncomplete) {
     bid.Network.codeVersion(oncomplete, this.getErrorDialog(bid.Errors.checkScriptVersion, oncomplete));
@@ -35,7 +36,7 @@ BrowserID.Modules.CodeCheck = (function() {
   function loadScript(version, oncomplete) {
     var script = document.createElement("script");
     script.type = "text/javascript";
-    script.src = "https://browserid.org/production/dialog_v" + version + ".js";
+    script.src = "https://browserid.org/production/" + fileNamePrefix + "_v" + version + ".js";
     document.head.appendChild(script);
 
     oncomplete();
@@ -51,8 +52,9 @@ BrowserID.Modules.CodeCheck = (function() {
 
         data = data || {};
 
-        self.checkRequired(data, "code_ver");
+        self.checkRequired(data, "code_ver", "file_name_prefix");
         expectedCodeVer = data.code_ver;
+        fileNamePrefix = data.file_name_prefix;
 
         getMostRecentCodeVersion.call(self, function(version) {
           if(version) {
diff --git a/resources/static/test/qunit/shared/modules/code_check_unit_test.js b/resources/static/test/qunit/shared/modules/code_check_unit_test.js
index 90c2beb8c476adfb94eaef16d0b3174552f73322..c0701039d7d8e57d1a02ef16241c9fd24807a1c8 100644
--- a/resources/static/test/qunit/shared/modules/code_check_unit_test.js
+++ b/resources/static/test/qunit/shared/modules/code_check_unit_test.js
@@ -13,6 +13,7 @@
 
   function createController(config) {
     var config = $.extend({
+      file_name_prefix: "dialog",
       code_ver: "ABC123"
     }, config);
 
diff --git a/resources/views/index.ejs b/resources/views/index.ejs
index 45054b83c402a1fcee9bdc7b6de788ba69fabc00..96672f13c74e9e0fa355b7d70ae3c21b533eba4b 100644
--- a/resources/views/index.ejs
+++ b/resources/views/index.ejs
@@ -2,7 +2,7 @@
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
-  <div id="content" style="display:none" class="display_auth">
+  <div id="content" class="display_auth">
       <div id="newuser">
         New to BrowserID? <a href="/about">Learn more</a>
       </div>
diff --git a/resources/views/layout.ejs b/resources/views/layout.ejs
index 2d1cdd7976137dc61bd2cd1e3072f9abb883994f..a3738e19781c27e8cca395d02eb92cebd3b30ade 100644
--- a/resources/views/layout.ejs
+++ b/resources/views/layout.ejs
@@ -26,6 +26,7 @@
     <script src="/shared/javascript-extensions.js"></script>
     <script src="/shared/browserid.js"></script>
     <script src="/lib/dom-jquery.js"></script>
+    <script src="/lib/module.js"></script>
     <script src="/lib/jschannel.js"></script>
     <script src="/lib/winchan.js"></script>
     <script src="/lib/hub.js"></script>
diff --git a/scripts/compress.sh b/scripts/compress.sh
index 7e86abf6beca75f59f647505545852d8d056746d..1acfba26006f3a543a211dbf2ec492b62ee700b1 100755
--- a/scripts/compress.sh
+++ b/scripts/compress.sh
@@ -74,7 +74,7 @@ echo '****Building BrowserID.org HTML, CSS, and JS****'
 echo ''
 
 #produce the main site js
-cat lib/vepbundle.js lib/jquery-1.7.1.min.js lib/underscore-min.js lib/ejs.js shared/javascript-extensions.js shared/browserid.js lib/dom-jquery.js lib/jschannel.js lib/winchan.js lib/hub.js $BUILD_PATH/templates.js shared/renderer.js shared/error-display.js shared/screens.js shared/error-messages.js shared/wait-messages.js shared/mediator.js shared/storage.js shared/network.js shared/provisioning.js shared/user.js shared/tooltip.js shared/validation.js shared/helpers.js shared/class.js shared/modules/page_module.js shared/modules/xhr_delay.js shared/modules/xhr_disable_form.js shared/modules/code_check.js pages/page_helpers.js pages/start.js pages/index.js pages/add_email_address.js pages/verify_email_address.js pages/forgot.js pages/manage_account.js pages/signin.js pages/signup.js > $BUILD_PATH/browserid.uncompressed.js
+cat lib/vepbundle.js lib/jquery-1.7.1.min.js lib/underscore-min.js lib/ejs.js shared/javascript-extensions.js shared/browserid.js lib/dom-jquery.js lib/module.js lib/jschannel.js lib/winchan.js lib/hub.js $BUILD_PATH/templates.js shared/renderer.js shared/error-display.js shared/screens.js shared/error-messages.js shared/wait-messages.js shared/mediator.js shared/storage.js shared/network.js shared/provisioning.js shared/user.js shared/tooltip.js shared/validation.js shared/helpers.js shared/class.js shared/modules/page_module.js shared/modules/xhr_delay.js shared/modules/xhr_disable_form.js shared/modules/code_check.js pages/page_helpers.js pages/start.js pages/index.js pages/add_email_address.js pages/verify_email_address.js pages/forgot.js pages/manage_account.js pages/signin.js pages/signup.js > $BUILD_PATH/browserid.uncompressed.js
 
 # produce the main site css
 cat css/common.css css/style.css css/m.css > $BUILD_PATH/browserid.uncompressed.css