Again, I don't know how or where you set $SESSION['loggedin'], but when you do, use a timestamp. For example:
$_SESSION['loggedin'] = time(); // time() returns an integer Unix timestamp.
Not:
$_SESSION['loggedin'] = date('g:i a l F j Y'); // date() returns a string.
EDIT: Or, if you do use the latter form, then you need to convert it to a timestamp for use with date. Then
date('g:i a l F j Y', $_SESSION['loggedin'])
could be changed to
date('g:i a l F j Y', strtotime($_SESSION['loggedin']))
since strtotime() returns a timestamp. But, of course that would give you the same thing as
$_SESSION['loggedin']
Post the code where $_SESSION[loggedin'] is set.