Added Ajax functionality for attending and unattending events