Once again wrapped the response writer to detect early exits
BasicAuth middleware