refactor tests for register page