add checking login on registration, add logs