Could you help me defensively against Ayane
This depends on what the Ayane player is doing to you. Most Ayane players that I see playing use a hardcore rush-down tactic. If they are doing this they are making your job easy to kill them. Just wait them out because they are going to do something unsafe, and probably going to attack or hold out of it. So you keep punish throwing them for that. Like Kasumi, when Ayane is unsafe it is real bad. Most of the time you can go for 10i throws or higher. Hayate's 10i just so happens to setup pressure on wake up.
Do not use any type of SS when you are defending against her. You are asking to be Counter blown/thrown majority of the time for attempting to. Her string manipulation on block can be easily read just so as long as you are patient and are aware of her strings. For example: 6K2K (a string the lot of them love to use), ducking kills this string because there is not a mid follow up. Online 6K into a low throw is a tactic that does not work in the real world where Fuzzy Guarding can be done properly. So do not get too upset about being caught by that. You have to go into sparring and figure out the rest.
When she is at max screen and a player opts to roll to you for her throw or the mid kick. Press 3K and that stops that movement from being a threat. You stop her before any of the options become active to hit or throw you. The stun you get is a Back Turned Stand Up Stun. You have guaranteed options after the stun.
If you are playing an Ayane who is solid, patience is the key to your victory. She is a good character and there is not a way to run her over when she is played correctly. So you will need to know what her strings are, and recognize them while playing against her. Know what the player is spacing with and how to advance around it. Hayate has Range as well so you are not completely at her mercy if distance is involved. While she is moving and trying to bait you to move or hit a button I suggest staying away from high attacks. She will evade them more than likely.
Again, all this depends on what the Ayane player is doing to you. That stuff is just general information and I can sit here type for a while on various different tactics to counter play her when going against her. Overall, learn what her strings are so you can hold her better, and punish her hard when something unsafe is done to you. With doing that alone, you will start to weed out who is good and who is just annoying when playing with her because they are all over the place throwing stuff out.
Could you help me defensively against Kasumi
The same thing can be done to Kasumi. Just wait her out and throw punish her. It is worse for Kasumi because she has to sit in your face and attack whereas Ayane can run away a lot easier. So you do not have the chase down factor with Kausmi. Just wait her out, 9/10 when she is done with a string it is unsafe.
In the event you come across one that is poking at you and not finishing too much of anything. Try to create some distance between the two of you. His 4P+K4 is a great tool for this, or crushing her with 4P. If you are successful at creating distance do not be eager to give up the space you worked hard to get by doing a predicable 3H+K or 214P. You will start your headache all over again being next to her. SS Kasumi is just as big of a problem as SS Ayane. Kasumi tracks after the 2nd hit in most of her stings, as well as having good initial tracking options (P+K and 6K to name a couple). If Kasumi is throwing you often in the neutral game you will open yourself up to being Counter Thrown as well.
When she rushes you down from max screen, as long as there is not a wall behind you. 4P+K4 works well against her. At range there is not much she can do to Hayate. So be patient and pay attention to her and poke at her effectively from range especially if she is whiffing attacks to get close to you. Kasumi is a good character and there is nothing you can do to shut her out completely when she is played correctly. Knowing her strings helps a great deal but that helps with any character you face.
I can tell you more but this depends on what a player is doing to you. More than likely doing basic stuff, like: throw punishing, whiff punishing, and holding correctly, and slow escaping will allow you to put away most of the stuff you are having problems with.
I do not mean to come off as rude or negative to you, though, I am sure if I watched you play you probably lack in all 4 of those categories. So build on that and you will see what I am talking about. I know sparring is boring for a lot of people but, it is there for a reason.