Fixing bug in session when using machine credentials

get_unique_record was being called on site table without adding the
service_id as part of the unique key