Added REST helper function, respond(), template() and http_auth()