Very basic devise/cancan functionality in javascript