changed create_session management command, and fixed unit test