add tests for the registration page, plus some cosmetic work