Devise update

Use of code coming from this discussion: https://gist.github.com/josevalim/fb706b1e933ef01e4fb6
First version, so-called "usafe" but does not rely on API authentication signature change.