... setting cookies for different domains than the one that is active. You have to have a page that loads up all the cookie setting codes from remote domains.
However the loading up of authentication page, the remote authenticator pages in their iframes, and the redirection is VERY fast, taking only 1 seconds or 1.5 seconds. just like how you see in facebook etc - or any other site that uses this method.
All files contain extensive comments, and also include configuration variables to change.