refactored the index and cio to use an external config.  chaned user creation to use sequence of middleware