Pass user object to callback in resources.js