code reworking and login start