CWI-1511: Fix security context being incorrectly associated with login
page for certain browser versions.