Changed web/index.php to use Response object to render error messages instead of echo