Add login_init action and associated function