improved login flow