Removing n+1 query

Removing n+1 query in accepted_sessions