wip but rw and user login works