fixing redirect loop when creating new account