Issue-331: Changing code to support basic authentication when it comes to accessing token endpoint.