created a centralized authentication mechanism; still needs work