fixed user registration, added anonymous login to new code