Pattern and protocols for authentication via different providers