user login refacktor