Added basic authentication support (unfinished)