Connection Api implemented. Before login/register connection is checked.