refactor out authclient

enable auth from other components