Merge pull request #1 from zhumo/implement_devise

complete user authentication functions
Merge pull request #2 from zhumo/master

Merge pull request #1 from zhumo/implement_devise