'verify user\'s identify via Github and retrieve an auth token from Ansible Galaxy.'

def execute_login(self):

    if (self.options.token is None):
        login = GalaxyLogin(self.galaxy)
        github_token = login.create_github_token()
    else:
        github_token = self.options.token
    galaxy_response = self.api.authenticate(github_token)
    if (self.options.token is None):
        login.remove_github_token()
    token = GalaxyToken()
    token.set(galaxy_response['token'])
    display.display(('Successfully    logged    into    Galaxy    as    %s' % galaxy_response['username']))
    return 0
