bugfix: usage of deprecated setStatus
added new session handling + cleanup
Merge pull request #10 from wick-ed/master

changed session handling