add login and register check