A bunch of fixes

1. When I'm testing this out, my wiki isn't at /wiki, and the files aren't at /w. I changed the links so that the software would automatically detect the base URL, so that others can test it more easily.

2. The reason people couldn't log in or submit edits is because there was a form tag (the search bar) that was not closed, so the submit button that seemed to be in the login/edit forms was really in the search form.

3. I made the footer links work

4. I fixed a bunch of badly formed HTML, and removed a bunch of debug statements