Get variables from ajax request in code behind

So, some time ago, I needed to make ajax requests to access the code behind. I did that (here).

But now I'm working on asp.NET Core 2.0 and it works differently. Well, now I can make a request but, for some reason The variables are null (only on the code behind, on the client side they have content. Probably isn't a big deal, but I can't grasp why.

You also passing a object as paramter so you either have to change you route paramter to an object containing email and password property, or you change your Content-Type to 'application/x-www-form-urlencoded' and pass a query string like 'email=....&password=....'