Devise helper refactored