expose protect middleware to configuration
fix typos in test file