merged 2 versions logingregister with newproject