handling sessions better