Adding authentication/authorization to client-side