Add user authentication. Now works, needs facelift