Add a test for signup form error messages and some test refactoring