fixed some bugs, encryption key now asked for properly when moving between chats