Added Base64 encoding method and basic auth header method