added redirect response handler