refactor registation pages