protected function registerRequestBindings()
  {
    $this->singleton('Illuminate\Http\Request', function () {
      // create a new request object
      $request = Request::capture();
      // create an arbitrary response object
      $this->response = new Response;
      // get a SessionManager from the container
      $manager = $this['session'];
      // startup the StartSession middleware
      $middleware = new StartSession($manager);
      $middleware->handle($request, function() {
        return $this->response;
      });
      // print out any cookies created by the session system
      foreach($this->response->headers->getCookies() as $cookie) {
        @header('Set-Cookie: '.$cookie);
      }
      return $request;
    });
  }