Fixes login / logout when HTTP Basic Headers are avilable.
Don't to set the cookie it wasn't needed.
cookie would be useless if value is not set
Don't always $cookie_path, only set it when needed
Fixed Typo
Remove missed stuff from merge
Merge pull request #7852 from josh4trunks/basic_auth_fix

Fixes login / logout when HTTP Basic Headers are avilable.