Fixes #43 by checking the redirect URL.