I'm trying to make a button appear if condition "isauthenticated" is "true".

used [this](https://stackoverflow.com/questions/8317958/show-div-based-on-if-statement) as a reference, but not sure what's wrong with my code.

```
<button id="authentic" type="hidden">test</button>

<script>
    window.onload = function() { 
        var logedIn = ('{{isauthenticated}}')

        if(logedIn == "true") {
            document.getElementById('authentic').style.display = 'block'; 
        } else {
            document.getElementById('authentic').style.display = 'none';
        }
    }
</script>

```