Add history badges
Set and load pin, redirect when necessary