Merge pull request #1 from MattSkala/master

Refactored and updated to work with version 31.8.2012
More universal, now working with libver 17.5.2012
Removed duplicate login call