I want to build a headless craft-cms site. Frontend is on mydomain.com, backend on login.mydomain.com
However, i want users to login in the frontend and create a session there. Only logged in users can then see some sites or data on the website.
How would i achieve this authentication over different domains?