wip: refactor auth on client