Aligning with Logic: Measuring, Evaluating and Improving Logical Consistency in Large Language Models