feature 1668: use underscore.js to template the userDetails instead of generating HTML directly in javascript. Will make work easier for plugins modifying the user profile.