title: using request builder to authenticate user: Not working in spring security
body: <p>I need to authenticate a user in a page based on the remember me cookie,
  inspired by this site: <a href="http://raibledesigns.com/rd/entry/integrating_gwt_with_spring_security" rel="nofollow noreferrer">Tutorial for checking spring authentication</a>,
  I came up with a solution for checking the authentication.</p>
  
  <p><strong>Changes made in my application</strong></p>
  
  <p>applicationContext-security.xml:</p>
  
  <pre><code>&lt;intercept-url pattern='/**AuthenticationChecker.html' access="ROLE_ADMIN"/&gt;
  ...
  &lt;form-login login-page="/Login.html" authentication-failure-url="/Login.html" always-use-default-target="true" default-target-url="/Main.html"/&gt;
  </code></pre>
  
  <p>Gwt code:</p>
  
  <pre><code>try
  {
      RequestBuilder rb = new RequestBuilder(
      RequestBuilder.POST, "AuthenticationChecker.html");
              rb.sendRequest(null, new RequestCallback() 
              {
                  public void onError(Request request, Throwable exception)
                  {
                      RootPanel.get().add(new HTML("[error]" + exception.getMessage()));
                  }
                  public void onResponseReceived(Request request, Response response)
                  {
                      RootPanel.get()
                     .add(new HTML("[success (" + response.getStatusCode() + "," + response.getStatusText() + ")]"));
                  }
              }
      );
  }
  catch (Exception e)
  {
      RootPanel.get().add(new HTML("Error sending request " + e.getMessage()));
  }
  </code></pre>
  
  <p>AuthenticationChecker.html is a simple blank html page,
  from what I understand, as AuthenticationChecker.html requires role as admin, I should have got a 401 Unauthorized if remember me cookie was not present and a 200 OK if the user was authenticated and his cookie was present.</p>
  
  <p>However, the output always shows: [success (200,OK)]</p>
  
  <p>To cross check, i simply typed authenticaionChecker.html (without logging in) and it returned back to Login.html indicating that spring is indeed authenticating the user.</p>
  
  <p>Am I doing something wrong here ?</p>