modified registering: error handling for already registered user who try
to login via register