More sign-in refactoring