The server can ask the browser to set cookies with the secure flag on over HTTP, but the browser should only include them in responses via HTTPS.
But you should never present a request for authentication over HTTP direct responses to authentication requests over HTTP. The former may be tampered with to copy the credentials elsewhere, while the latter can be sniffed.
Mixing and matching HTTP and HTTPS is not a good recipe for a secure site. They should be clearly delimited.