edited middleware to also proces documents so user obj is connected

With the updated urls in 1% (Putting documents under /admin/ namespace, this, indeed, has become obsolete.