fix redirect locations following structure change
error object with test code at bottom - ignore for now
can't require in config.php from here

doesn’t need to get a connection here anyway as a connection will be
passed in by the controllers whenever a method is called. Issue with
requiring in config - will explain tomorrow