Fixed issue #247: first social login, then setting password leads to error