temporarly removed auth related code #prune
fixed using couchdb
handle media upload POST + GET #hackish