added authentication on client side