This sample project shows how to login to the Server with user name and password. For this purpose you can use the login REST command. As parameters, you need to specify the user name (Email) and password. These parameters can be passed in the HTTP request header:
#region Login
url = "http://localhost:40010/1/login";

var request = WebRequest.Create(url);
request.Headers.Add("x-sti-UserName", "";);
request.Headers.Add("x-sti-Password", "111111");

var stream = request.GetResponse().GetResponseStream();
var sr = new StreamReader(stream);
string Out = sr.ReadToEnd();
var json = JObject.Parse(Out);
// Get session key
var sessionKey = (string)json["ResultSessionKey"];