Added logic to devise.rb for Heroku