return locals() instead of locals in register_success