Add a meta refresh for non-JS users.

Also, move most of the JS into the header rather than the body