use own loader instead of hook_init() because hook_init() is not reliable with ajax