updated register and dashboard code.