Fixed the bug which the establishing the session occurrs many time.
Added the new function to create the bookmark when images saved.