ajax does not work and log in apears for a seconed