Added js for sending invites to the server