added common utility to write json objects to the HTTP response.
update gallery timestamp to change the gallery on dashboard.