Add devise and modify some basic functionality
Merge branch 'devise'