Changed wp_set_auth_cookie call to check force_ssl_login and force_ssl_admin instead of is_ssl.