user save fixed and session save function added