finalize authentication