modified login flow