add cookie secure parameter to cookies set by javascript