added client side authentication