Further refinements to Devise.rb.