Help to create ajax login

I am in the middle of the code but I can not receive mikrotik response information. Why I do not even know which method he uses to avoid these responses