Removing Devise dependency

Only load Devise module if Devise has already been loaded

Fixes #2648