Fix authentication security hole with external providers
Merged #35 "Fix authentication security hole with external providers"