Hooked up js favoriting to server