Added source for persistence lib. Added more generel methods for SharedHandler and login is finished