Added template for registration logic