Add validation and better control logic to accounts app