do Register & beforelogin