Security Enhancements

Due to having released an early version of 0.2 prior to the targeted release date, the security features weren't as robust as had to be. This branch tackles all the issues that were left to do.

For the full explanation of the changes see the commitmessage at 9d1b27b66d76523ae45a6af0e76602e313c7651f