Tidy up UserController.

Remove unused functions.

Replace tabs with spaces.