select user_id, max(date) as date
from login
group by user_id
order by user_id