Adding documentation to functions & some further refactoring.
Refactoring zodat de structuur van de authenticatieservice in de client duidelijker is.