add a default not_found_handler as last middleware, so if no middleware matched the route a 404 is thrown