little fix on authentication with ssl (sometimes working)