added function rejectOffer in server