add functions
add files, _connect_auth_server() must be rewrited.