Phase 4 of implementing authentication