public static function log($action , $username = null , $timestamp = null , $ip = null , $useragent = null)
	{
		if ( ! is_array( self::$auth ) ) throw new Exception( 'Authentication not initialized' );

		if ( ! isset( self::$auth['logs'] ) ) {
			self::$auth['logs'] = array();
		}

		if ( is_null( $username ) ) $username = self::getCurrentUsername();
		if ( is_null( $timestamp ) ) $timestamp = date("U");
		if ( is_null( $ip ) ) $ip = self::getClientIp();
		if ( is_null( $useragent ) ) $useragent = ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) ? $_SERVER['HTTP_USER_AGENT'] : '';

		self::$auth['logs'] = array_slice( array_merge( array( array( $action , $username , $timestamp , $ip , $useragent ) ) , self::$auth['logs'] ) , 0 , abs( (int) AUTH_LOG_FILE_COUNT ) );

		return true;
	}