Added sessionRotate and sessionInvalidate functions