register and login work with validation