backend use environment variable to set Connection
changed auth method, use external .json
code clean up + function time