Add exception handling for authentication and get data.