title: Devise registration confirmation
body: <p>I have a User and an Admin role in my project. I created my authentication with Devise. </p>
  
  <p>In my admin role I don't have any confirmation. In my User model I have the following:</p>
  
  <pre><code>devise :database_authenticatable, :confirmable, :recoverable,
         :rememberable, :trackable, :validatable, :timeoutable, :registerable
  
  # Setup accessible (or protected) attributes for your model
  attr_accessible :email, :username, :prename, :surname, :phone, :street, :number, :location,
                  :password, :password_confirmation
  </code></pre>
  
  <p>My migration looks like:</p>
  
  <pre><code>class DeviseCreateUsers &lt; ActiveRecord::Migration
    def self.up
      create_table(:users) do |t|
        t.database_authenticatable :null =&gt; false
        t.confirmable
        t.recoverable
        t.rememberable
        t.trackable
        t.timeoutable
        t.validateable
        t.string  :username
        t.string  :prename
        t.string  :surname
        t.string  :phone
        t.string  :street
        t.integer :number
        t.string  :location
  
        t.timestamps
      end
  
      add_index :users, :email,                :unique =&gt; true
      add_index :users, :confirmation_token,   :unique =&gt; true
      add_index :users, :reset_password_token, :unique =&gt; true
      add_index :users, :username,             :unique =&gt; true
      add_index :users, :prename,              :unique =&gt; false
      add_index :users, :surname,              :unique =&gt; false
      add_index :users, :phone,                :unique =&gt; false
      add_index :users, :street,               :unique =&gt; false
      add_index :users, :number,               :unique =&gt; false
      add_index :users, :location,             :unique =&gt; false
    end
  
    def self.down
      drop_table :users
    end
  end
  </code></pre>
  
  <p>In my routes.rb I added following statements:</p>
  
  <pre><code>map.devise_for :admins
  map.devise_for :users, :path_names =&gt; { :sign_up =&gt; "register", :sign_in =&gt; "login" }
  
  map.root :controller =&gt; "main"
  </code></pre>
  
  <p>After user registration I am redirected to the controller <code>main</code> with the flash notice, "You have signed up successfully," and I am logged in. But I don´t want to be logged in, because I have not confirmed my new user account yet. </p>
  
  <p>If I open the console I see in the logs the confirmation mail text, but I am already logged in. I can´t explain why. Does anyone have an idea? </p>
  
  <p>If I copy out the confirmation-token from the logs and confirm my account, I can log in, but if I don´t confirm, I also can log in.</p>