refactor login flow