fixed connection issues
set up interaction with server for trails
merged