Detect cookie capability before login, thanks to Moritz Lenz.