revised user login flow