removeSession function