Updated the client code a bit
added auth
Fix bug with exposed