extracte code from md to ScalaSessionFlash.scala
Merge pull request #1027 from XuefengWu/master

extract code from md to ScalaSessionFlash.scala