finish register, initial login code