Leave button action working and leaving from server