title: Always getting 401 Unauthorized with new install of Rails + Devise
body: <p>I have a new install of Rails and am trying to set up authentication with Devise. As far as I can tell I have a very basic set up that should work, but whenever I try to log in with the default Devise sign in form I get an Unauthorized error. I am sure my credentials are correct as I created a User to test with in the console like so:</p>
  
  <pre><code>User.new({:email=&gt;'mark@markdavies.com.au', :priv_level =&gt; 'admin', :password=&gt;'mypassword', :password_confirmation=&gt;'mypassword'}).save
  </code></pre>
  
  <p>My User model:</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
  
    # Include default devise modules. Others available are:
    # :token_authenticatable, :confirmable,
    # :lockable, :timeoutable and :omniauthable
    devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable, :confirmable
  
    # Setup accessible (or protected) attributes for your model
    attr_accessible :email, :password, :password_confirmation, :remember_me, :priv_level, :unconfirmed_email
    # attr_accessible :title, :body
  
    has_one :supplier
  
  end
  </code></pre>
  
  <p>My log:</p>
  
  <pre><code>Started POST "/admin/user/sign_in" for 127.0.0.1 at 2012-12-22 13:10:56 -0500
  Processing by Admin::SessionsController#create as HTML
  Parameters: {"utf8"=&gt;"✓", "authenticity_token"=&gt;"wYLsalxN9rTv8P8bvYuT0wZcvlFbu6b1SvoCyKtTCII=", "admin_user"=&gt;{"email"=&gt;"mark@markdavies.com.au", "password"=&gt;"[FILTERED]", "remember_me"=&gt;"0"}, "commit"=&gt;"Sign in"}
  User Load (0.2ms)  SELECT "users".* FROM "users" WHERE "users"."email" = 'mark@markdavies.com.au' LIMIT 1
  (0.1ms)  begin transaction
  (0.0ms)  commit transaction
  Completed 401 Unauthorized in 69ms
  </code></pre>
  
  <p>Is there any way I can get more information about what is failing from Devise? When I create the user in the console is the encryption used different than through the forms?</p>