 	public func authenticate(email: String, password: String) -> Promise<AuthToken> {
 		
 		self.email = email
+        UserDefaults.standard.set(email, forKey: "TeslaSwift.email")
 		self.password = password
 
 		let body = AuthTokenRequest(email: email,

    // MARK: Streaming API
    
    static let streamingBaseURL: String = "wss://streaming.vn.teslamotors.com"
    static let streamParameters: [String] = ["speed", "odometer", "soc", "elevation", "est_heading", "est_lat", "est_lng", "power", "shift_state", "range"," est_range", "heading"]

    
    private func getStreamURLRequest(vehicle: Vehicle) -> URLRequest? {
        let vehicleID: String = String(describing: vehicle.id)
        let streamParametersString: String = TeslaSwift.streamParameters.joined(separator: ",")
        let urlString = "\(TeslaSwift.streamingBaseURL)/stream/\(vehicleID)/?values=\(streamParametersString)"
        if let url = URL(string: urlString) {
        let request = NSMutableURLRequest(url: url)
            if let token = self.token?.accessToken {
                request.setValue("Bearer \(token)", forHTTPHeaderField: "Authorization")
                return request as URLRequest
            }
        }
        return nil

     - parameter dataReceived: callback to receive the websocket data
     */
    public func openStream(vehicle: Vehicle, dataReceived: @escaping (StreamEvent) -> Void) {
        if let urlRequest: URLRequest = getStreamURLRequest(vehicle: vehicle) {
            webSocket = WebSocket(request: urlRequest)
            print("Open Websocket")
            webSocket?.open()
            webSocket?.event.message = { data in
                print("data: \(data)")
                if let string = data as? String,
                    let mapped: StreamEvent = Mapper<StreamEvent>().map(JSONString: string) {
                        dataReceived(mapped)
                }
            }
        }
    }
