implemented secure cookies