title: How to prevent a user from directly accessing my html page by writing URL?
body: <p>i want a hard coded Login Page (<strong>login.html</strong>), with no database. 
  If a person writes correct username and password, it redirects to (<strong>page2.html</strong>).</p>
  
  <p>Now my problem is that if a person write the URL directly for page2.html , he will be able to access it, without any login.</p>
  
  <p><strong>Ideal Case</strong> => www.example.com/login.html => if Correct => www.example.com/page2.html </p>
  
  <p><strong>Problem Case</strong> => www.example.com/page2.html => page2.html , NO LogIN :(   </p>