every step error? why that?

     @user = User.find(:first, :conditions => ["username = ?",
params[:user][:username]] )
      if @user.username?
        redirect_to :action => 'account'
      end

This should be simple login system, I want to check if the username
exists in the table? But this give me NIL exception?

Suppose username you are looking for does not exist.
User.find will return nil. Next you call username on nil... oops.

Try @user instead of @user.username

Regards,
Rimantas

Hi --