Taking action when user logs in/out in devices and users mode

I have recently created some nice idle screens for my grandstreams incorporating logged in user name and extension etc.
I want to know how to send the refresh screen notify message to the phones when the user logs in or out to take advantage of this.

They mention something at the bottom of here http://www.voip-info.org/wiki/view/GXP-2000+XML+Idle+Screen (has the non interactive version of my idle screens at the top ;->) about the scripts they use to do it, and when i manually run the command
"asterisk -rx “sip notify grandstream-idle-screen-refresh (extensionnumber)” it all works i just need to know how to send it automagically.

editing “user_login_out.agi” seems like the “bad” way of doing it lol.
I presume I need to somehow grab the event UserDeviceAdded and do something with it?
Or can i do it simply through some sort of dialplan mojo (keeping in mind that i know nothing of dialplan mojo).

Basically I’m stuck, i haven’t the foggiest on where to even start looking for how to proceed.