Use HTTPS for all communication between the client and the server. This will automatically encrypt the traffic between them. The only change required will be to replace
in the client configuration.
HTTPS - Wikipedia
Depending on how your server is configured, you might be able to use a free SSL certificate from Let's Encrypt