log out full functionality