Usually for websites with JS I use Watir-Webdriver
http://watirwebdriver.com/

The above site has a few examples which should make writing a login 
script easy.

-- 
Posted via http://www.ruby-forum.com/.