add session and encrypt