A Completeness Theorem for Higher Order Logics