ACE has no knowledge about what happened in a previous connection.
All you can do is inspect the header of the new http request and identify some information which could identify if the user is logged in or not.
For example, if the server sets a particular cookie when the client is logged in, you can check the presence of this cookie to determine if the client is connected and send the redirect to https.
BUT, since the client will potentially keep the same cookie, even if he logs out, then ace will continue redirecting the client to https.
Only the server has the complete knowledge of the client state.
So the redirect should come from the server.
Gilles.