Add end session functionality