code: function (credentials) {
              return function () {
                  return this.thenOpen(globals.adminUrl).then(function () {
                      this.fill('#login-form', credentials || globals.credentials, true);
                  }).waitForResource(/login/).thenEvaluate(function () {
                      localStorage.clear();
                  });
              };
          }
docs: Logs in with the given parameters
  
  @param {Object} [credentials=globals.credentials]
  @param {String} credentials.username
  @param {String} credentials.password
  @returns {Function}