Updated to log all user database errors.

Corrected an issue where users were unable to register because the id
field changed to username.