fixed the user client inheritence problem, completed some unit tests