Integration for devise

Hi. i'm trying to use this on my project.

As you know, my pull request is suck. But you can get some hint to fix something.