Implemented proper way of storing credentials.