add ability to specify realm when authenticating