register and login fixed