*note: I didnt read your code, just your question.
if your concerned about the code being called more than once
PLAYER_ENTERING_WORLD is called pretty much anytime you hit a loading screen... going into an instance, leaving an instance, and what not
PLAYER_LOGIN is called at login or a reloading of the ui