fixes #3504
Merge pull request #3512 from dotCMS/issue-3504-remember-environment-without-refresh-page

fixes #3504