Added support for return custom error response from AuthenticationHandler