adding ability to pass in arrays of functions that are called, to support passport plugin