http://ja.asciicasts.com/episodes/270-authentication-in-rails-3-1
を参考に。
http://stackoverflow.com/questions/7609778/rails-3-1-mongoid-has-secure-password
1,ActiveModel::SecurePasswordのインクルード
model/User.rb
class User include ActiveModel::SecurePassword end
2.find_by_emailのメソッドが使えないので変更
sessions_controller.rb
def create - user = User.find_by_email(params[email]) + user = User.where(:email => params[:email] ).first end