Added validations for registered users

Users won’t be able to register if such name and password already
exists.