Access token retrieval process improved, tests reorganized