debugging auth from scratch