adding the logic for handling user interactions during signin