Removed a unnecessary imports from mongo_login_helpers.py and repeated code from tests.py.