prepare to finish authenticate