complete restful (BULK+ rpc) + add login middleware