Try to fix an intermittent failure in signing in by waiting until we've loaded the page before adding cookies

I believe this should stop or reduce the likelihood of the intermittent failure:

TimeoutException: Message: u"Couldn't find elems matching #signout (visibility check: True)"

I don't exact details, but I think what is happening is that there's some bad interaction by us adding a cookie before the sidebar is fully loaded - maybe the worker is picking it up, or even that the cookie doesn't really get stored on the right domain.

So I think this should fix the issue (I've not seen it today since I landed this), if not we'll need to do more in-depth debugging.