fixed a problem with register and login