It sounds like you have your first one figured out. You need to either root or switch to a pas code rather than a pattern.
I'm not sure about the second one. Can you try posing what you have for your profiles and tasks (which is easier said than done, it can get difficult to portray that information in a way that's easy to read)? I've never found a reason to switch my data off so I've never tried it. Has it ever worked or is this your first time trying and you can't get it to work right at all? I find that Tasker does a bad job of saving changes you make. Many times I have to exit and save, start Tasker again, disable it, reenable it and then exit and save to get some of my changes to "take." Making sure that you're actually connected to your home WiFi is obvious, but I feel safer mentioning it.
If you go into Tasker you can see which profiles are active. If the profile that's supposed to be on when you're connected to your WiFi is not active then you should figure out why, after going through the tedious steps I gave above. If it is active you need to find out why your task isn't doing what it's supposed to.
Also, if you look in the help for the Mobile Data action you'll see that some people report that some apps can turn mobile data back on after you've turned it off. If everything else is working right then it might just be something like that.
One action that's super useful for debugging is the Alerts>Flash. It will show a little box on the bottom of the screen with whatever text you want in it. It's a great way to see if your tasks are being performed, your flow (e.g. if statements and for loops) is correct or if variables are being set correctly.