Ajax calls in register are no asynchronous