added friendlist and fixed session recovery
Merge branch 'friendList' into phase1