Fixed bug causing token to be a stdClass rather than array when logging in using simple flow