Handle local login with CouchDB