FIXED: hardcoded references to localhost in redirects