Add tests for preventing malicious redirects