generalize logout action passing