put the script directly in the view...

… to save one http request
-gets IP from /myip via ajax
-checks if IP has changed
-calls /nic/update if DNS needs to be updated
-repeats every 5 mins