How AI Enhances Identity Security and Threat Detection