TODO make registration front-end