Added error handling in test code that will fix "Required fields are missing"  issue in tests ( issue #19 )
Fixed Warning: fread(): Length parameter must be greater than 0 #26
code formatting
Merge pull request #29 from lklimek/master

Minor fixes: fixed fread() warning, added login error handling to examples/test_*