@theaht123
It doesn't work for me, even if you only specify that sort. It might be because it doesn't return the last login field and so it cannot sort on it.
Right under your endpoint is List recently logged in students. Does it accomplish what you need?
Last login may not be as useful as people think, though. Depending on whether they're accessing from a mobile app or the web and how long login timeout is set for, it may not reflect when they were last in the system. Logins are also for an entire instance, not per course, so they might be logging in but not doing any work in that particular course. You might get more use out of the last_activity_at timestamp when you request the enrollment information.