Login/Register logic update