added templates for registration view, fixed bugs