Detect the AP and the modes using WWW-Authenticate header Fix #22