fixed problem with registering new user