Added last_active functionality