added HTTP request/response logging with middleware