added subscribe functionality. user now gets logged out, when he exits the application