         self.password = password
     }
 }
+
+//MARK: GenericPasswordSecureStorable
+
+extension AuthenticationData: GenericPasswordSecureStorable {
+
+    /// The service that the authentication data is saved under in the keychain.
+    var service: String {
+        return "HomeControl"
+    }
+
+    /// The account that identifies the authentication data in the keychain.
+    var account: String {
+        return username
+    }
+}
+
+//MARK: CreateableSecureStorable
+
+extension AuthenticationData: CreateableSecureStorable {
+
+    /// Data that's saved in the keychain.
+    var data: [String: AnyObject] {
+        return ["password": password, "serverAddress": serverAddress]
+    }
+}
+
+//MARK: ReadableSecureStorable
+
+extension AuthenticationData: ReadableSecureStorable {}
+
+//MARK: DeleteableSecureStorable
+
+extension AuthenticationData: DeleteableSecureStorable {}

import Locksmith

/// Contains all data necessary to authenticate a user at the server.
struct AuthenticationData: ReadableSecureStorable, CreateableSecureStorable, DeleteableSecureStorable, GenericPasswordSecureStorable {

    //MARK: Properties



    /// Password of user.
    let password: String

    //MARK: Initialization

