Edit_profile: return HTTP401 error for invalid password

Also populate the errors field properly