Added redirect function to response.