added authentication. Migration to Express middleware
added authentication. Migration to Express middleware