add log out code