Updated login/sign-up logic