def METHOD_NAME(proto, username, password):
    """
    Initial callback - invoked after the server sends us its greet message.
    """
    # Hook up stdio
    tp = TrivialPrompter()
    stdio.StandardIO(tp)
    # And make it easily accessible
    proto.prompt = tp.prompt
    proto.display = tp.display
    # Try to authenticate securely
    return (
        proto.authenticate(password)
        .addCallback(cbAuthentication, proto)
        .addErrback(ebAuthentication, proto, username, password)
    )