added deregister_user function