removed a few logging details. Console is tidier
Profile is no longer a global variable
Unique index will ensure that the usernames stored are unique. No need to perform additional checks
Added a check to see if the contact is supplied before attempting to add it to the database