add some login - logoff logic