Fix login for different envs