Add credential verification API and add logs for debugging.