title: How to hide a div after showing only once in a session
body: <p>I've a div that will show the success message after successful login and will hide after 4 seconds. The js code used is</p>
  <pre><code>    document.getElementById('success').style.display = 'none';
  }, 4000);
  </code></pre>
  <p>This works fine. But this div will pop up every time I navigate to home page and I don't want that to happen. This div should be in hidden state until logged out and logged in again. It would be better to have a solution that wont use jquery as this is a project. I've tried sessionStorage also but that hides the div immediately after showing and not  lasting 4seconds.</p>
  <p>Thanks in advance</p>