title: URL Access to static HTML pages - in Parse.com platform before login
body: <p>I’m new to parse and was trying to create a simple web app with it using static HTML pages, CSS, and JS
  I’ve used cloud functions also for a few tasks.</p>
  
  <p>The thing is that I’ve created a login page and a function that checks if the user is logged into the web app with JS client-side and it looks like this:</p>
  
  <pre><code>function CheckUserLogin(){ 
     var currentUser = Parse.User.current();
     if (currentUser) {
      //do nothing
     } else {
      //rediect user to login html page
      window.location.href = “loginpage.html”
    }
  }
  </code></pre>
  
  <p>The thing is that if the user navigates to the /Home.html page via browser URL he can see the page for a few seconds until js checks if he logged in and redirects the user out to the login page.
  I guess that’s not so secure…</p>
  
  <p>Any idea how to get a solution for achieving this task via js or parse.com cloud functions more secure?</p>