save last step and patientId in cookies