handle custom redirect_url