reverted logic for register route