improved code for support_external_idp
Merge branch 'dev' of git://github.com/ConPaaS-team/conpaas into dev