elsif (user = User.authenticate(:username => username, :password => password, :pending => true))
unconfirmed_login(user)
elsif User.authenticate(:username => username, :password => password, :suspended => true)
elsif (user = User.authenticate(:username => username, :password => password, :pending => true))
unconfirmed_login(user)
elsif User.authenticate(:username => username, :password => password, :suspended => true)