Problem with session

I have problem when i tried to logging logging successfull,
but when tried to find out the current cuser details by session it
always says nil

code for loging:-

@user =[:user])
    #session[:user_id] = nil

    case request.method
    when :post

      respond_to do |format|
        if @current_user = User.authenticate(, params[:user]
          session[:user_id] =
          flash[:notice] = "user login successfully !!!"
          format.html { redirect_to(users_path) }
          flash[:notice] = " better try next time !!!"
          format.html { render :action => "index" }

i want to fetch user details from user table by from user controller
Couldn't find User with ID=2

but the current user id is not 2, it always take id 2