[SOLVED] MetaMask not logging session to Moralis

I have a React app that connects to the Moralis Server.
I have deleted a session on my Moralis Dashboard, as I was trying to reset (what I thought) was a connection issue.

I have a button in my index.js

<button onClick= {login} >Test button</button>

This runs the login async

async function login() {
    
        let user = Moralis.User.current();
            if(!user) {
                user = await Moralis.authenticate({signingMessage:"Message"}); 
                      
            }
            
            console.log(user);
            alert("You have signed this.", user);
          
        }

Now when I run the app I get the user object in my console, and it runs the alert, but the session is not logged onto the Moralis Dashboard anymore, and it doesn’t load MetaMask anymore.
I also get these two errors in my console
Screen Shot 2022-03-02 at 8.21.48 PM

How can I solve this issue?

HOW I SOLVED THIS

I cleared all my cookies in local storage and that of Moralis. Ran the app again and it successfully logged my session to the Moralis DB and also triggered the MetaMask window and signing message.

The 400 (Bad Request) status code indicates that the server cannot or will not process the request because the received syntax is invalid, nonsensical, or exceeds some limitation on what the server is willing to process. It means that the request itself has somehow incorrect or corrupted and the server couldn’t understand it. The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method . Therefore, it prevents the website from being properly displayed. The main thing to understand is that the 400 Bad Request error is a client-side error.

The cause of a 400 error can be a wrongly written URL or a URL that contains unrecognizable characters. Another cause of the error might be an invalid or expired cookie. Also, if you try to upload a file that’s too large. If the server is programmed with a file size limit, then you might encounter a 400 error.