I'm using Drupal 7. When I POST request to remote site (services_endpoint/user/login) I am able to receive a session name and session id and all other information about user. After that when I open a tab in the same browser OR do automated redirect, I am not logged in to the remote website. I think I need to set cookie somehow to a browser. I try with setcookie($session_name, $sessid) but it's not working!