Add function to terminate a given session