login flow updated/corrected