[bug 882655] first stab. Not sufficient for popcorn integraton

this tries to add the new iframe-based SSO to popcorn, but testing reveals this is not sufficient, and the popcorn code is quite the maze. I do not know what else needs changing here to make things work...