register/login cleanup