Added Basic Authentication

Hi,

thank you for open-sourcing this code. This patch works with a local database with an admin password.

To test it, secure your DB with user `admin` and password `9CXwgpdE` and run the tests.

I'd be happy, if you could merge the change or give me some advice as how to make it better.

Thank you


Kambiz