Add History Controller

- fix history for anonymous users (save to session)
- fix DBRef queries -> should query as `'user.$id' => $user_id`