Fixed redirects to use url_for