Logic and the Foundations of Mathematics