Added threading for server and adding friend