Created test structure, finished login function

Authentication and database mocking for tests.