httprequest to php login system
isset() accepts multiple parameters, you can simplify:

if (isset($parameters["inserted_id"]) &amp;&amp; isset($parameters["inserted_password"])) {


To

if (isset($parameters["inserted_id"], $parameters["inserted_password"])) {

When ever I read anyone's code or database schema and I see any mention of id, I immediately assume that I am dealing with a positive integer.  If the value is anything other than a positive integer, I never use id in the field/column/variable name.
I never use mysqli's init() call because it is optional.  I'll recommend objected-oriented mysqli syntax because it is less verbose.
I don't think I'd json encode/decode your form data -- it seems like unnecessary extra data handling.  See here: jQuery Ajax POST example with PHP
echo doesn't need those parentheses. 
I am confident that @YourCommonSense will post a comprehensive answer containing the 3 pieces of commented advice and more, so I'll leave those recommendations to him.
You don't need to write out all those close() calls, just echo your message and let the script end naturally.  If you're going to kill the script at if (isset($_SESSION['user_id'])) { be sure to sure to echo something for consistency. 
I find javascript alert() boxes to be terribly annoying and a bit trashy to be honest.  Give your site some "class" and fashion an attractive presentation for any response messages that you plan to offer.
Your .html has form fields, but no form -- that doesn't feel valid to me.  I'll recommend adding the form tags and names attributes.  Some discussions: https://stackoverflow.com/q/33370025/2943403