promise based client, ajax local login, authenticated aoute handling