fix authenticate