Work login.html and reg.html. bug in check registration