handling already registered usernames
added test db
removed test data insertion
introduced test data script for resetting mongodb and inserting test data