added fetchUserId()
replaced promises with callbacks
correctly parse payloads