add support for secure cookies