title: App Engine development server fails to detect logged-in user
body: <p>I'm trying to use App Engine's UserService on a local development server and it's not behaving as I expect. I searched the forum for answers to my question but couldn't find any that specifically address my problem.</p>
  
  <p>The first thing I do is get a login URL from the UserService as follows:</p>
  
  <pre><code>UserService userService = UserServiceFactory.getUserService();
  if(userService.isUserLoggedIn())
    String loginURL = userService.createLoginURL("/mycallbackservlet");
  else
    ... do something else
  </code></pre>
  
  <p>Assuming the user is not logged in initially, I provide a 'mycallbackservlet' as destination URL to be redirected to after (successful) login. To start the login procedure I open a GWT window on the client side as follows:</p>
  
  <pre><code>Window.open(loginURL, "Bla", props);
  </code></pre>
  
  <p>The loginURL is the one created above. I'm presented with the local development server's simulated login screen where you can type in any user. I just click OK. Now my callback servlet is called (as expected) but when I retrieve the UserService object again it does not give me a logged in user, that is</p>
  
  <pre><code>UserServiceFactory.getUserService().isUserLoggedIn()
  </code></pre>
  
  <p>returns 'false'. How can this be? Is this typical development server behavior or am I doing something wrong? Should I have opened the initial URL differently, that is, not using Window.open() but something else?</p>
  
  <p>Any suggestions would be highly appreciated!</p>