Fix signed-in user visit register path bug and add some tests