SSO functions with callback