Dispatch hooks before following redirects

Fixes #1183 

/cc @mkomitee