fixed register and login issues