Standardize variable init and triggere when using login