Add authorization to both client and the server