Added secure cookie functionality.