That's not valid HTML.
You commented on another answer with links to "this, this and this". Those are all questions about vue.js, a templating language that transpiles to (produces) HTML. Other templating languages include EJS, Pug, Handlebars, React, and Angular.
If you are really using vue.js in your project, you should add the vue.js tag to this question and future questions related to it.
The @click attribute is only meaningful to Vue, and it will not be present in the actual HTML on the webpage. Vue might turn it into an onclick handler, so you could try using $('div[onclick="login()"]') which might return you the element you want.
Otherwise, give your div an id too:
<div id="login-button" @click="login()"> Login </div>
And select on that id: $('#login-button')
innerText?