full working login flow