Added encryption and fixed some issue with database connection.