Bug fixes for sso cookie