Fix bug with logging in, start implementing encryption
Add some additional logging around errors