Rewriting user management using AngularJS; lots of fixes.