Refactor: internalised auth