(Bug 5073) Make logged out form work again

This varies the HTML we generate depending on if we're in Foundation
mode or not.