Rearrange client auth lib