working cnonection logic but not sure sessions are shared