Added config option for limiting post args
Fix bug in success/failure of register function