我正在使用示例代码登录 youtube:
def auth(email, password):
# Setup service.
yt_service = gdata.youtube.service.YouTubeService()
yt_service.email = email
yt_service.password = password
yt_service.source = 'youtube_interface'
yt_service.developer_key = DEVELOPER_KEY
# Login.
yt_service.ProgrammaticLogin()
return yt_service
请告诉我,我怎样才能知道登录是否成功?以及如何注销?