I think it's slightly buggy: this seems to remember the very first initlal state only, but I think it should remember the state before we disable $('#keystone_delay_auth_decision'). For instance, if it's false, then I change tempurl to true (sets to true and disables), and tempurl back to false (sets to false and enables), then change $('#keystone_delay_auth_decision') to true manually, then the next cycle won't work as expected.