Before AA revamped their site (as the New American) they had fixed this problem. Instead of the 'Invalid State', it would re-route you to a login page.
With the New AA site, this went away. Which is a shame because the new website is a HUGE improvement over the old one.