before end
reg and login