auto update data whenever user log out, log in, enroll a new course or un-enroll a course.