Added an 'after_request' handler.
In it, we log database queries which take longer than the duration we have deifned.