SSO and header fixes