Basic Authentication Helper Function

re: #138