bug fix/special debugging code added

Fixed a bug where the function that sets the user's info wasn't setting
the user ID
Also added some special debugging code to determine why certain inputs
are causing fatal PHP errors.