Refresh mongodb session if needed