DO NOT DO THIS. Django has a perfectly good and fully documented system for replacing the User model while keeping the authentication system, which has had several years to be tested for security vulnerabilities. Yours is not at all secure and you should not try to do it.
0
solved Custom Django login, can not compare passwords