Fix some logical errors.

1. A application cannot be launched if there is another running application.
2. A application cannot be launched.
3. Checking the application's id when receiving a 'join' request.
4. Clear timer in session when session disconnected.

Signed-off-by: Manson Li <manson.li@matchstick.tv>