 		(result) ->
 			if /^\d+,/.test result
 				change_icon CONST.status.connected
+				clear_error()
 				successCallback && successCallback result
 			else
+				change_icon CONST.status.unconnected
 				failCallback && failCallback result
-				change_icon CONST.status.unconnected
 	)
 
 login_net = (callback) ->

		matches = response.match /\d+,([^,]+),\d+,\d+,\d+/
		if matches
			change_icon CONST.status.connected
			callback && callback(
				status: CONST.status.logged_in
				username: matches[1]

# error end
###
fatal_error_handler = (err_code) ->
	#TODO reimplement!!!!!!
	auto_online_clear()
	#msg = if code of CONST.err_code_list then CONST.err_code_list[res] else res
	localStorage.setItem CONST.storageKey.auto_online, CONST.status.auto_online_off
