checks whether user already exists and prevents duplicate usernames