save user and friends to database
merge changes