handle mimetype a bit better for now by using finfo to determine mimetype, support access_token query parameter now to access the API