Fix the middleware
- get_authed_user is not a method on the middleware class
- Only modify the session in the remote client if the user is logged in