fixxed bug with user register not working