define([
    'app'
  , 'text!login.html!strip'
  , 'validval'
  , 'css!login'
  ],
  function (App, source, validator) {
    var response = {};

    response.data = source;
    response.callback = function (self) {
      if (App === undefined) {
        def = new $.Deferred;

        def.done(function(gadget) {
          // prefix instance-ids, pass JSON
          App.renderGadgets(gadget);
        });

        window.fallbackLoader.deferreds.push(def);
        window.fallbackLoader.args.push(self);
      } else {
        // prefix instance-ids, pass JSON
        App.renderGadgets(self);
      }
    };

  // return response object
  return response;
  }
);
