Added option for not resetting session