NO_SERVER_AVAILABLE --> FA_NO_SERVER_AVAILABLE
modify some magic numbers
add code: AUTH_ERROR
tidy some code