Fixes #40: Add request logging
Optimized middleware order
Don't use deprecated middleware