     /// The Server that the Client connects to.
     public let server: Server
     
+    /// The Credentials for the API.
+    private let credentials: Credentials?
+    
     /// Create an unauthenticated client for the given Server.
     public init(_ server: Server) {
         self.server = server
+        self.credentials = nil
+    }
+    
+    /// Create an authenticated client for the given Server with a token.
+    public init(_ server: Server, token: String) {
+        self.server = server
+        self.credentials = .Token(token)
+    }
+    
+    /// Create an authenticated client for the given Server with a username and password.
+    public init(_ server: Server, username: String, password: String) {
+        self.server = server
+        self.credentials = .Basic(username: username, password: password)
     }
     
     /// Fetch the release corresponding to the given tag in the given repository.

}

extension NSURLRequest {
    internal static func create(server: Server, _ endpoint: Client.Endpoint) -> NSURLRequest {
        let URL = NSURL(string: server.endpoint)!.URLByAppendingPathComponent(endpoint.path)
        return NSURLRequest(URL: URL)
    }
}


    internal func fetchOne<Object: Decodable where Object.DecodedType == Object>(endpoint: Endpoint) -> SignalProducer<Object, Error> {
        return NSURLSession
            .sharedSession()
            .rac_dataWithRequest(NSURLRequest.create(server, endpoint, credentials))
            .mapError(Error.NetworkError)
            .flatMap(.Concat) { data, response -> SignalProducer<Object, Error> in
                let response = response as! NSHTTPURLResponse
