Rename $DEBUG to $DEBUG_AUTHY.

$DEBUG was too generic and could already exist on people servers.
Also added more debugging statements.