add code for register activity