Added support of Flask 0.10 or above

In order to let this project support Flask 0.10 or above, I modified
some codes (i.e., covert the credential as JSON format)