database part of login and  manage friends finished