MATLAB Online is not free; you need to have an active account of one of several kinds.
If Harvard has a Total Academic Headcount license, then they would provide activation codes for student licenses, which could be used with MATLAB Online. If I recall something I read, for at least some of the universities that offer TAH licenses, when you register with MATLAB Central using an email address belonging to the university, then MATLAB Online will automatically know you are eligible to use the software.
If you are taking a MOOC (Massive Open Online Course) then as far as I know, MOOC licenses cannot be used with MATLAB Online.