Auth failed accounts and write to SQL database