fix register and register/success page login redirect bugs