Closes #22 and #23. Basic auth is done.