fix authchoice.js

I tested this a little bit. It seems that it works in all cases.

..my bad English))