LILY-309: created loginrequiredmixin

also refactored everything in cases.