#1513 Authentication for server to server synchronization

DONOT MERGE. KEEP IT OPEN FOR TRAVIS TO BUILD. Once the build succeeds have to change the ci and other environments such that all of them will have authentication for databases.