Only redirect on logout if we're not already redirecting
Merge pull request #2162 from simonwelsh/sec-redirect

Only redirect on logout if we're not already redirecting