Completed logout function; broke with session.clear()