add registration logic and page template