authenticate to get uid