Redirect to referrer before action