Try the following script in your base Joomla folder:
<?php
// Initialize Joomla
define( '_JEXEC', 1 );
define('JPATH_BASE', dirname(__FILE__) );
// Required Files
require_once (JPATH_BASE . '/includes/defines.php');
require_once (JPATH_BASE . '/includes/framework.php');
// To use Joomla's Database Class
require_once (JPATH_BASE .'/libraries/joomla/factory.php');
$app = JFactory::getApplication('site');
$user = JFactory::getUser();
echo '<pre>' . print_r ($user, true) . '</pre>';
You need to open another Joomla page and login there (same browser).