cleanup Authenticate codes