def login(self, request, user_name, password):
    try:
      auth_model_class = import_string(settings.AUTH_USER_MODEL)
    except (__HOLE__, AttributeError), e:
      raise ImproperlyConfigured, \
          'Failed to import %s: "%s".' % (settings.AUTH_USER_MODEL, e)
    user = auth_model_class.get_by_user_name(user_name)
    if user is None:
      return False
    if user.check_password(password):
      return self.store_user(user)
    return False
dataset/ETHPy150Open IanLewis/kay/kay/auth/backends/datastore.py/DatastoreBackend.login