single-loop login