using ajax to retrieve session