Done converting library to Ruby (mostly untested).
bin folder bugfixes (cli params and missing login/logout calls).