Fixed cookie expiration, also fixed static cookie encryption issue