refactored dashboard html with templates and added back-end support for it