Added logic for authentication and credentials store