Added statements to close the popup after deleting a friend.