Apphook fixes

- [x] move application_urls to page
- [x] namespaces in apphooks
- [x] errors if there is no app_name defined
- [x] include parameters

fixes #1678