set Secure flag on cookies if running with HTTPS
Merge pull request #295 from dajohi/master

set Secure flag on cookies if running with HTTPS