refactored client creation to factory, basic normalizers, auth client methods, code grant handling