merging in devise changes
reworked instances.coffee to instances.js.coffee
fixing merge conflicts