Implementing basic http authentication