Fix the login prod vs dev issue, make it correctly query the environment variable