implemented getUserState (the entire API is implemented now), fixed bugs