code: 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 Truf 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
docs: Wrapper to the docker.py login method