have a longer timeout value when testing
configurable logging; refactor middleware initialization