title: Spark-java redirect - browser does not redirect
body: <p>Ok, so I try to follow Spark documentation and I want to perform simple redirect in my Single Page Application. My code looks like this:</p>
  
  <pre><code>post("/users/login", (req, res) -&gt; {
          ObjectMapper mapper = new ObjectMapper();
          User creation = mapper.readValue(req.body(), User.class);
          User user = userService.getUser(creation.getLogin());
          if (user.getPassword().equals(creation.getPassword())) {
              req.session().attribute("userid", creation.getLogin());
              System.out.println("OK");
              res.status(201);
              res.redirect("/index.html");
              return "";
          }
          System.out.println("BAD");
          return null;
      } , json());
  </code></pre>
  
  <p>Basically, I have three static html files: registration.html, login.html and index.html. I read stuff concerning staticFileLocation so I added at the beginning of main function following line of code:</p>
  
  <pre><code>staticFileLocation("/public");
  </code></pre>
  
  <p>When I type correct login and password I find in the network view in Chrome that I have GET request with status 200, OK, to <a href="http://localhost:4567/index.html" rel="nofollow">http://localhost:4567/index.html</a>. However, the browser does nothing and does not redirect me to that page. Can you tell me what I am doing wrong?</p>
  
  <p>EDIT:
  Here's javascript code that handles log in on the client side:</p>
  
  <pre><code>app.controller('LoginUserCtrl', function($scope, $http) {
  $scope.loginUser = {};
  $scope.submitForm = function() {
      $http({
          method : 'POST',
          url : 'http://localhost:4567/users/login',
          data : $scope.loginUser,
          headers : {
              'Content-Type' : 'application/x-www-form-urlencoded; charset=UTF-8'
          }
      }).success(function() {
          console.log("User logged successfully");
          console.log($scope.loginUser);
      }).error(function() {
          console.log("Unknown error while logging user");
      });
  
  };
  });
  </code></pre>