code: function(flow) {
          const completed = (this._data || {}).completed || [];
          for (let i = 0; i < flow.stages.length; ++i) {
              const stageType = flow.stages[i];
              if (completed.indexOf(stageType) === -1) {
                  return stageType;
              }
          }
      }
docs: Get the first uncompleted stage in the given flow
  
  @private
  @param {object} flow
  @return {string} login type