changed responses to make use of jsonify
added framework for basic authentication