Added layer of authentication to API and added its respective unit tests.