docstr: Check user's credentials and creates a session
          
docstr_tok: ["Check","user","'s","credentials","and","creates","a","session"]
code: def post(self):
      """Check user's credentials and creates a session"""
      username = request.json.get("username")
      password = request.json.get("password")
      if (
          isinstance(username, str) is False
          or len(username) == 0
          or isinstance(password, str) is False
          or len(password) == 0
      ):
          return http_error(
              400,
              "Error in username or password",
              "Username and password should be string",
          )
  
      config = Config()
      inline_username = config["auth"]["username"]
      inline_password = config["auth"]["password"]
  
      if username != inline_username or password != inline_password:
          return http_error(
              401, "Forbidden", "Invalid username or password"
          )
  
      session.clear()
      session["username"] = username
      session.permanent = True
  
      return "", 200
  
file_path: mindsdb/mindsdb/api/http/namespaces/default.py
imports: import time
  from flask import request, session
  from flask_restx import Resource
  from flask_restx import fields
  from mindsdb.__about__ import __version__
  from mindsdb.api.http.namespaces.configs.default import ns_conf
  from mindsdb.api.http.utils import http_error
  from mindsdb.utilities.config import Config
  from mindsdb.utilities import log
label_desc: Use image node_id 1 for calling the LoginRoute obj's underlying member method code with example usage: obj.post() and returns: str,  int, http_error, http_error