added env and secure cookies