How to override other module function/hook from my custom module?
In general, if a module does not provide a hook, some other will do. 
You could check if some hook in core fits to what you need to do. 
Depending on what is the final result of your data change, you could perform it after a module generates the data to be changed, and before the data gets saved, for example.
By another hand if a module already uses the same hook you want to use it is still possible to rely on the weight of your module to be sure it will run afterwards.
By the description of your specific requirements (login a user and create a user) hook_user_login and hook_user_presave could be used.