ajax returns only redirect url