Bugfixes and added client Id provider
Added client id provider and some tests
Added more tests