Instead of using manual db lookup for access log,
use device.access_list to fetch the data from
access_log table. This does the SQL query underneath.
To do so, instructions from SQLAlchemey were followed
to to many-to-one relations for users and devices,
respectevly.
Signed-off-by: HeshamTB <hishaminv@gmail.com>