Added an unload script that will clean up the DB if a user closes the window before logging out