refactoring of creating a logged in session, and BlogSpec