added friendlist and fixed session recovery