<html>

  <head>
   <title>Test</title>
  </head>

  <body bgcolor="white">
<?php 
if (isset($_POST['Submit'])) {
    require "RestClient.php";
    $obj = new RestClient();
    $response = $obj->login($_POST['email'], $_POST['encrypted_password']);
    if ($response['type'] == "confirmation") {
        setcookie("tgt", $response['tgt'], time() + 3600 * 24, '/');
        header('Location: welcome.php');
    } else {
        echo "<h1 style='color:red;text-align:center'>Login Failed</h1>";
    }
}
?>
  
  

  
<table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form name="form1" method="post" action="">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><strong>Member Login </strong></td>