implemented fully log out functionality