loginlogout fnc