handle all user events and perform Ajax calls