Now returns a meta-redirect instead of just the URL, misc fixes