Devise 3.1 upgrade fixes