add username checking and chain dumping