[jitsi-dev] logout functionality vs page unload functionality

I'm trying to get a grasp of what the difference is between the moderator logout functionality vs. that which executes on page unload. Specifically, when a moderator logs out, an iq 'logout' packet is sent. However, if the user just triggers a page unload (e.g. during a page refresh), then it appears that the user sends a packet changing there presence (i.e. signing-out). What's the difference in terms of the conference on the backend?
If I want the same logout behaviour to execute during the page unload, can I safely just replace the existing unload function with that from Moderator.logout(). Or should I keep the unload as is and just add the Moderator.logout() as the last execution?