code: def authenticate_user(scope, user=[None], password=[None]):
      
      conn = scope.get('__connection__')
      user = user[0]
      if user is None:
          conn.app_authenticate()
      else:
          account = Account(user, password[0])
          conn.app_authenticate(account)
      return True
docs: Like authenticate(), but logs in using the given user and password.
      If a user and password are not given, the function uses the same
      user and password that were used at the last login attempt; it is
      an error if no such attempt was made before.
  
      :type  user: string
      :param user: A username.
      :type  password: string
      :param password: A password.