Ghani signs security agreement with US