UserEditController: fixed a bug in account editing code (added some tests).