WIP: SSO integration via the API.

- CORS headers need to be set correctly.