added authentication and secure connection