[Vivian and Michael] refactored to have trigger on current environment to require login