Seems like overkill to do http basic auth on every request. Anyway, I figured it out. My http client lib wasn't sending the username, password values correctly. All is well now
How are you trying to authenticate? The simplest way is to use HTTP basic auth and pass credentials with every call. Are you using the /services/auth/login call? Have you tried using your credentials to connect to the management port using a browser?