'Logs the user into GitHub for protected API calls.
:param str username: login name
:param str password: password for the login
:param str token: OAuth token
:param func two_factor_callback: (optional), function you implement to
provide the Two Factor Authentication code to GitHub when necessary'

def login(self, username=None, password=None, token=None, two_factor_callback=None):

    if (username and password):
        self.session.basic_auth(username, password)
    elif token:
        self.session.token_auth(token)
    self.session.two_factor_auth_callback(two_factor_callback)
