Fix additional deprecation warnings regarding res.send

Server startup middleware and some tests need updating.