SDK can behave differently due to timing issues: https://github.com/jhellar/aerogear-js-sdk/pull/1#issuecomment-457133672
Initial implementation: https://github.com/aerogear/aerogear-js-sdk/commit/224504997e946232e5cf8660b9cf617e43f03a14