implemented end to end authentication