fixed cookie bug

fixed cookie inconsistency and added new encryption secret prop