title: How to reload the page after logging out <javascript>
body: <p>I am building a webpage and I'm having issues refreshing the page after I log out. 
  What I do when I log out is basically hiding one div and then show the "maindiv" which is basically the main page where you log in. Something like this:</p>
  
  <pre><code>function myfunction(){
  
  $("#seconddiv").hide();
  
  $("#maindiv").show();
  
  }
  </code></pre>
  
  <p>This works perfectly fine in order to take me to the main page but when I try to log in again, it won't work. Thanks in advance if you can give me some advice.</p>