Moved encryption to client
Fixed error handling
Testing database connection on startup