Added session clear logic.