For each user, label every maximal run of consecutive login days with a streak identifier.
The streak_id is the run's anchor date: the login date minus that day's position (1, 2, 3, …) among the user's login days in date order. Every day of a run shares one anchor. A user can log in more than once on the same day — return one row per user per login day.
Sort by user_id then login_date ascending.