added the addfriend handler and fixed register

addfriend add the friendship to the database. fixede the messages that
sends the register