when before redirecting to outside, make componentWillUnmount() has a
chance to be invoked before doing url validation.