created functions to add users and check if a user already exists