You cannot: if you did this as soon as the user left the SSL login page, their cookie will disappear and they will no longer be registered. If you must have a hybrid site with partially SSL, you will have to give a warning.
The real security issue is that you have a partially SSL site; A cookie warning is just a symptom of this. It is usually best to serve everything over SSL.
source share