Single-sign-on (SSO) support

Changes that are required to support cookie-based SSO