Add devise compatibility
Merge branch 'devise-compatibility'