<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def login(config, username=None, password=None, email=None, url=None, client=None, *args, **kwargs):
    '''
    Wrapper to the docker.py login method
    '''
    try:
        c = (_get_client(config) if not client else client)
        lg = c.login(username, password, email, url)
        print "%s logged to %s"%(username,(url if url else "default hub"))
    except Exception as e:
        utils.error("%s can't login to repo %s: %s"%(username,(url if url else "default repo"),e))
        return False
    return True