factor out registration button