handle http redirect in api requests
fixed edit account sql