updated login flow