Error reporting and getLogin Count

added get loginin count func