Changed login.php and logout.php to be neutral and tried to use our own api.