Logging still redirects to an invalid url