FIN-14: Minor refactoring of accounts controller: split out check for valid user password, and improved error reporting.