Updated to make sure the authentication status is a boolean