finish authentication.