Using environment variables in custom login page

Hi,
We have a custom login page and we want to be able to use environment variables inside that page.
For example we have the management api url.
In our DEV environment it’s a different url than in STAGE environment.
Anyone know how to achieve this?

Anyone?
Your help is appreciated.