added js for user model interaction