Ajax calls working into controller