TODO: Add a consistency layer, something like storing the credentials in a cookie or in the localStorage