Machine learning and face detection for authentication