Add foreign key references to favorite table
Remove js error message caused by access to fetch favorites when not logged-in.